๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.52K subscribers
5.56K photos
3 videos
95 files
9.68K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
#include <bits/stdc++.h>
using namespace std;

// Function to find the extended GCD
int64_t extendedGCD(int64_t a, int64_t b, int64_t &x, int64_t &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int64_t x1, y1;
    int64_t gcd = extendedGCD(b, a % b, x1, y1);
    x = y1;
    y = x1 - (a / b) * y1;
    return gcd;
}


int main ()
{
  int64_t a, b; cin >> a >> b;
  int64_t w; cin >> w;
  w *= 1000;
  int64_t x,y;
  int64_t gcd = extendedGCD(a,b,x,y);
  if (w%gcd != 0) cout << -1 << endl;
  else {
    x *= w / gcd;
    y *= w / gcd;
    a /= gcd;
    b /= gcd;
    int64_t lowerbound=ceil(-(double)x/b);
    int64_t upperbound=floor((double)y/a);
    if (lowerbound <= upperbound) {
          int64_t res1 = (x+b*lowerbound) + (y-a*lowerbound);
   int64_t res2 = (x+b*upperbound) + (y-a*upperbound);
   cout << res1 + res2 << endl;
    } else {
      cout << - 1 << endl;
    }
  }

}


Fruit weight combinations โœ…
def romanizer(numbers):
n1 = numbers
final = []
d = {1:'I', 4:'IV', 5:'V', 9:'IX', 10:'X', 40:'XL', 50:'L', 90:'XC', 100:'C', 400:'CD', 500:'D', 900:'CM', 1000:'M'}
for n in n1:
res = ''
while n > 0:
for i, j in reversed(d.items()):
if i <= n:
n -= i
res += j
break
final.append(res)
return final

Python3โœ…
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int M = scanner.nextInt();

        int[] A = new int[N];
        for (int i = 0; i < N; i++) {
            A[i] = scanner.nextInt();
        }

        WaxElement(A, N, M);

        scanner.close();
    }

    private static void WaxElement(int[] A, int N, int M) {
        for (int i = 0; i <= N - M; i++) {
            int max = A[i];
            for (int j = 1; j < M; j++) {
                if (A[i + j] > max) {
                    max = A[i + j];
                }
            }
            System.out.print(max + " ");
        }
    }
}
EY India is looking for professionals for their Business Consulting Risk team to execute various engagements, deliverables, internal audits and business-related presentations.

Position: Consultant
Experience: 0-3 years
Qualification: CA/ MBA / CIA / CA Inter

Location: Gurgaon

Interested candidates can comment and share their resume at rishabh.tyagi1@in.ey.com by mentioning subject as "Application for Consultant at EY"