Submission #1185381
Source Code Expand
import java.util.Scanner; public class Main { private static Scanner sc; public static void main(String[] args) { // TODO Auto-generated method stub sc = new Scanner(System.in); int N = sc.nextInt(); int K= sc.nextInt(); for(int i =1;i<=N;i++){ if(N==1){ N=N*K; break; } N=N*(K-1); } System.out.println(N); } }
Submission Info
Submission Time | |
---|---|
Task | B - Painting Balls with AtCoDeer |
User | ne280181 |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 371 Byte |
Status | WA |
Exec Time | 99 ms |
Memory | 23124 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 92 ms | 19412 KB |
0_001.txt | AC | 93 ms | 23124 KB |
0_002.txt | WA | 91 ms | 18640 KB |
1_003.txt | WA | 92 ms | 21588 KB |
1_004.txt | WA | 94 ms | 19540 KB |
1_005.txt | WA | 91 ms | 21716 KB |
1_006.txt | WA | 99 ms | 18896 KB |
1_007.txt | WA | 89 ms | 21716 KB |
1_008.txt | WA | 91 ms | 19924 KB |
1_009.txt | AC | 90 ms | 19796 KB |