101010
010101
101010
010101
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/ |
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 |
import com.apple.eawt.AppEvent; | |
import java.util.Scanner; | |
public class Main | |
{ | |
public static void main(String[] args) | |
{ | |
int a; | |
int b; |
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.
The goal of this exercise is to program a “Guess My Number” game. When it’s finished, it will work like this:
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 |