We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f8824b commit 1e7cdc2Copy full SHA for 1e7cdc2
game-theory/20004.cpp
@@ -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