Q
백준 3003

C code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| #include <stdio.h> #define SIZE 6
int main(void) { int chessman[SIZE] = {1, 1, 2, 2, 2, 8}; int input;
for(int i = 0; i < SIZE; i++) { scanf("%d", &input);
if(input < 0 && input > 10) return 0;
printf("%d ", chessman[i] - input); }
return 0; }
|
Author:
Slay
Permalink:
http://sean-baek.github.io/2023/05/03/baekjoon-3003/
License:
Copyright (c) 2021 CC-BY-NC-4.0 LICENSE
Slogan:
Do you believe in DESTINY?