Skip to content

Commit 1e7cdc2

Browse files
committed
boj 20004 베스킨라빈스 31
1 parent 1f8824b commit 1e7cdc2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

game-theory/20004.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <iostream>
2+
#define MAX 31
3+
using namespace std;
4+
5+
int N;
6+
7+
void func() {
8+
for (int i = 1; i <= N; i++) {
9+
if (MAX % (i + 1) == 1) cout << i << '\n';
10+
}
11+
}
12+
13+
void input() {
14+
cin >> N;
15+
}
16+
17+
int main() {
18+
cin.tie(NULL); cout.tie(NULL);
19+
ios::sync_with_stdio(false);
20+
21+
input();
22+
func();
23+
24+
return 0;
25+
}

0 commit comments

Comments
 (0)