답안 #64398

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
64398 2018-08-04T09:43:20 Z TAMREF Great Pow! (kriii1_G) C++11
1 / 1
4 ms 812 KB
#include <cstdio>
int main(){
  int a, k;
  scanf("%d%d",&a,&k);
  if(k == 0) printf("%d\n",a);
  else printf("%d\n",a&1?a:1);
}

Compilation message

G.cpp: In function 'int main()':
G.cpp:4:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d",&a,&k);
   ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 3 ms 480 KB Output is correct
4 Correct 3 ms 700 KB Output is correct
5 Correct 2 ms 700 KB Output is correct
6 Correct 3 ms 700 KB Output is correct
7 Correct 1 ms 700 KB Output is correct
8 Correct 4 ms 700 KB Output is correct
9 Correct 2 ms 700 KB Output is correct
10 Correct 2 ms 700 KB Output is correct
11 Correct 2 ms 700 KB Output is correct
12 Correct 3 ms 700 KB Output is correct
13 Correct 2 ms 700 KB Output is correct
14 Correct 2 ms 768 KB Output is correct
15 Correct 4 ms 768 KB Output is correct
16 Correct 3 ms 768 KB Output is correct
17 Correct 3 ms 768 KB Output is correct
18 Correct 3 ms 768 KB Output is correct
19 Correct 3 ms 768 KB Output is correct
20 Correct 2 ms 768 KB Output is correct
21 Correct 3 ms 768 KB Output is correct
22 Correct 3 ms 768 KB Output is correct
23 Correct 4 ms 812 KB Output is correct
24 Correct 2 ms 812 KB Output is correct
25 Correct 2 ms 812 KB Output is correct
26 Correct 3 ms 812 KB Output is correct
27 Correct 3 ms 812 KB Output is correct
28 Correct 3 ms 812 KB Output is correct
29 Correct 3 ms 812 KB Output is correct
30 Correct 3 ms 812 KB Output is correct
31 Correct 2 ms 812 KB Output is correct
32 Correct 3 ms 812 KB Output is correct
33 Correct 2 ms 812 KB Output is correct
34 Correct 2 ms 812 KB Output is correct