Submission #1450666


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
int main(){
	long long unsigned n, k, ans = 1;
	scanf("%llu%llu", &n, &k);
	for(int i = 1; i <=n; i++){
		if(i%2) ans*=k;
		else ans*=(k-1);
	}
	printf("%llu", ans);
	return 0;
}

Submission Info

Submission Time
Task B - Painting Balls with AtCoDeer
User pantho
Language C++14 (GCC 5.4.1)
Score 0
Code Size 235 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:5:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%llu%llu", &n, &k);
                           ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
AC × 2
WA × 1
AC × 3
WA × 7
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 1 ms 256 KB
0_001.txt AC 1 ms 256 KB
0_002.txt WA 1 ms 256 KB
1_003.txt WA 1 ms 256 KB
1_004.txt WA 1 ms 256 KB
1_005.txt WA 1 ms 256 KB
1_006.txt WA 1 ms 256 KB
1_007.txt WA 1 ms 256 KB
1_008.txt WA 1 ms 256 KB
1_009.txt AC 1 ms 256 KB