Skip to content

Instantly share code, notes, and snippets.

View Shubhra22's full-sized avatar
🎯
Focusing

Shubhra Sarker Shubhra22

🎯
Focusing
View GitHub Profile
https://leetcode.com/problems/running-sum-of-1d-array/
https://leetcode.com/problems/richest-customer-wealth/
https://leetcode.com/problems/shuffle-the-array/
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/
https://leetcode.com/problems/richest-customer-wealth/
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/
https://leetcode.com/problems/shuffle-the-array/
https://leetcode.com/problems/number-of-good-pairs/
@Shubhra22
Shubhra22 / CCC Contest 1
Created December 5, 2020 19:31
CCC COntest
https://dmoj.ca/problem/ccc17j1
https://dmoj.ca/problem/ccc17j2
https://dmoj.ca/problem/ccc16j1
https://dmoj.ca/problem/ccc16j2
https://dmoj.ca/problem/ccc17j1
https://dmoj.ca/problem/ccc17j2
https://dmoj.ca/problem/ccc16j1
https://dmoj.ca/problem/ccc16j2
@Shubhra22
Shubhra22 / HomeWork.md
Last active November 21, 2020 19:53
Homewok for nested loop

H.W: 1

101010

010101

101010

010101

import com.apple.eawt.AppEvent;
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
int a;
int b;

Problem 1

Fermat’s Last Theorem says that there are no integers a, b, and c such that an + bn = cn, except when n ≤ 2.

Write a method named checkFermat that takes four integers as parameters – a, b, c and n – and checks to see if Fermat’s theorem holds. If n is greater than 2 and an + bn = cn, the program should display “Holy smokes, Fermat was wrong!” Otherwise the program should display “No, that doesn’t work.” Hint: You may want to use Math.pow.

Problem 2

The goal of this exercise is to program a “Guess My Number” game. When it’s finished, it will work like this:

@Shubhra22
Shubhra22 / While Loop
Last active September 26, 2020 19:58
Homework Week3
You have Two numbers. Write a program to find the value of one number raised to the power of another.(Do not use Java built-in method)
Reverse an integer number. For example, if the input is 12345, the output should be 54321.
https://dmoj.ca/problem/ccc14j3
https://dmoj.ca/problem/ccc14j2
https://dmoj.ca/problem/ccc13j2
https://dmoj.ca/problem/ccc15j1
https://dmoj.ca/problem/ccc10j3