๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
import java.util.Scanner;
public class Solution {
public static int countSundays(int startYear, int endYear) {
int answer = 0;
int day = 1;
for (int year = 1900; year < startYear; year++) {
for (int month = 1; month <= 12; month++) {
day = (day + daysInMonth(month, year)) % 7;
}
}
for (int year = startYear; year <= endYear; year++) {
for (int month = 1; month <= 12; month++) {
if (day == 0) {
answer++;
}
day = (day + daysInMonth(month, year)) % 7;
}
}
return answer;
}
private static int daysInMonth(int month, int year) {
switch (month) {
case 4:
case 6:
case 9:
case 11:
return 30;
case 2:
if (isLeapYear(year)) {
return 29;
} else {
return 28;
}
default:
return 31;
}
}
private static boolean isLeapYear(int year) {
if (year % 4 != 0) {
return false;
} else if (year % 100 != 0) {
return true;
} else if (year % 400 != 0) {
return false;
} else {
return true;
}
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int startYear = in.nextInt();
int endYear = in.nextInt();
int result = countSundays(startYear, endYear);
System.out.print(result);
}
}
Well fargo |javaโ
public class Solution {
public static int countSundays(int startYear, int endYear) {
int answer = 0;
int day = 1;
for (int year = 1900; year < startYear; year++) {
for (int month = 1; month <= 12; month++) {
day = (day + daysInMonth(month, year)) % 7;
}
}
for (int year = startYear; year <= endYear; year++) {
for (int month = 1; month <= 12; month++) {
if (day == 0) {
answer++;
}
day = (day + daysInMonth(month, year)) % 7;
}
}
return answer;
}
private static int daysInMonth(int month, int year) {
switch (month) {
case 4:
case 6:
case 9:
case 11:
return 30;
case 2:
if (isLeapYear(year)) {
return 29;
} else {
return 28;
}
default:
return 31;
}
}
private static boolean isLeapYear(int year) {
if (year % 4 != 0) {
return false;
} else if (year % 100 != 0) {
return true;
} else if (year % 400 != 0) {
return false;
} else {
return true;
}
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int startYear = in.nextInt();
int endYear = in.nextInt();
int result = countSundays(startYear, endYear);
System.out.print(result);
}
}
Well fargo |javaโ
Scanner scanner = new Scanner(System.in);
int numOfProducts = scanner.nextInt();
int[] orders = new int[numOfProducts];
for (int i = 0; i < numOfProducts; i++) {
orders[i] = Math.abs(scanner.nextInt());
}
int disAmount = scanner.nextInt();
int count = 0;
for (int order : orders) {
if (disAmount % order == 0) {
count++;
}
}
System.out.println(count);
Wells Fargo Javaโ
int numOfProducts = scanner.nextInt();
int[] orders = new int[numOfProducts];
for (int i = 0; i < numOfProducts; i++) {
orders[i] = Math.abs(scanner.nextInt());
}
int disAmount = scanner.nextInt();
int count = 0;
for (int order : orders) {
if (disAmount % order == 0) {
count++;
}
}
System.out.println(count);
Wells Fargo Javaโ
๐1
IBMโ
Python 3
Python 3
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Baker Hughes is Hiring !!
Role: Specialist - Software Engineering- Fresher
Batch: 2023, 2022
Expected CTC: 8-15 Lpa
Location: Mumbai
Apply Now: https://unstop.com/jobs/specialist-software-engineering-baker-hughes-759124
Role: Specialist - Software Engineering- Fresher
Batch: 2023, 2022
Expected CTC: 8-15 Lpa
Location: Mumbai
Apply Now: https://unstop.com/jobs/specialist-software-engineering-baker-hughes-759124
Unstop
Specialist - Software Engineering by Baker Hughes! | 2023 // Unstop
Specialist - Software Engineering a jobs by Baker Hughes open to Engineering Students Apply online before 2023-09-27 23:59:00! | 2023
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Pagoda is Hiring !!
Role: Full-Stack Software Engineer
Batch: 2024, 2023, 2022
CTC: $148,750 - $195,000
Location: Remote - North America, South America
Apply here- https://boards.greenhouse.io/pagoda/jobs/6888659002?gh_jid=6888659002&gh_src=2c6c34b02us
Role: Full-Stack Software Engineer
Batch: 2024, 2023, 2022
CTC: $148,750 - $195,000
Location: Remote - North America, South America
Apply here- https://boards.greenhouse.io/pagoda/jobs/6888659002?gh_jid=6888659002&gh_src=2c6c34b02us
boards.greenhouse.io
Senior Search Engineer, Data Platform
Remote - North America, South America
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
โ๏ธNorlox Solutions Off Campus Freshers Recruitment As Candidate Counsellor | 40K/Mโ๏ธ
๐จโ๐ปJob Role : US Candidate Counsellor
๐Qualification : Any Graduate
๐Experience : Fresher
๐ฐSalary : Up To 40K/M
โญ๏ธ Apply Fast :
https://www.norloxsolutions.com/career/
๐จโ๐ปJob Role : US Candidate Counsellor
๐Qualification : Any Graduate
๐Experience : Fresher
๐ฐSalary : Up To 40K/M
โญ๏ธ Apply Fast :
https://www.norloxsolutions.com/career/
Norlox Solutions
Career - Norlox Solutions
Drop Us Your Details Current Openings US Candidate Counsellor Designation โ US Candidate Counsellor Educational Qualification โ Minimum Bachelorโs Degree in any discipline (Preferred) Experience โ Fresher, 1 to 2 years in Sales & Marketing (Preferred) Shiftโฆ
Anyone Give Samsung exam OA
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Ziplr
Role: Internships and Full time roles
Batch eligible: 2022 and 2023 grads
Apply: https://ziplr.hire.trakstar.com/
Role: Internships and Full time roles
Batch eligible: 2022 and 2023 grads
Apply: https://ziplr.hire.trakstar.com/
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Referral at Nucleus Software
https://www.linkedin.com/posts/rishabhhmishra_freshershiring-activity-7106956983710195712--eod
https://www.linkedin.com/posts/rishabhhmishra_freshershiring-activity-7106956983710195712--eod
Linkedin
#freshershiring | Rishabh Mishra | 1,789 comments
--------CLOSED NOW----------
#freshershiring is now open Nucleus Software !
interested candidates can dm their resume for referral .
Insights :
โข Position : Assistant Software Engineer
โข Location: Noida
โข Eligibility Criteria
โข B.Tech / B.E (CS, IT โฆ
#freshershiring is now open Nucleus Software !
interested candidates can dm their resume for referral .
Insights :
โข Position : Assistant Software Engineer
โข Location: Noida
โข Eligibility Criteria
โข B.Tech / B.E (CS, IT โฆ
string getLongestRegex(string a, string b, string c)
{
const size_t n = a.size();
int idx = -1;
for (int i = 0; i < n; i++) {
if (c[i] != a[i] && c[i] != b[i]) { idx = i; }
}
if (idx == -1) return "-1";
string res;
for (int i = 0; i < n; i++) {
if (i == idx) {
string cur = "[";
for (int j = 'A'; j <= 'Z'; j++) if (j != c[i]) cur += j;
cur += "]";
res += cur;
} else {
res += "[ABCDEFGHIJKLMNOPQRSTUVWXYZ]";
}
}
return res;
}
C++โ
def minimumCost(price):
n = len(price)
price.append(0)
ans = float('inf')
last = {price[0]: 0}
for i in range(1, n):
v = price[i]
price[i] += price[i - 1]
if last.get(v) != None:
ans = min(ans, price[i] - price[last[v]] + v)
last[v] = i
return ans if ans != float('inf') else -1
n = int(input())
price = list(map(int,input().split(' ')))
print(minimumCost(price))
Python 3โ
Amazon
n = len(price)
price.append(0)
ans = float('inf')
last = {price[0]: 0}
for i in range(1, n):
v = price[i]
price[i] += price[i - 1]
if last.get(v) != None:
ans = min(ans, price[i] - price[last[v]] + v)
last[v] = i
return ans if ans != float('inf') else -1
n = int(input())
price = list(map(int,input().split(' ')))
print(minimumCost(price))
Python 3โ
Amazon