# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
213564 |
2020-03-26T06:52:09 Z |
berryzed |
Great Pow! (kriii1_G) |
Java 11 |
|
121 ms |
13168 KB |
import java.util.Scanner;
public class G {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long a = scanner.nextLong();
long k = scanner.nextLong();
System.out.println(pow(a, k) % 3);
}
private static long pow(long a, long k) {
if (k < 0) {
return a;
} else {
return pow(a * a, k-1);
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
121 ms |
13168 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |