-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path256.cpp
More file actions
21 lines (20 loc) · 675 Bytes
/
256.cpp
File metadata and controls
21 lines (20 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <bits/stdc++.h>
int main() {
int a[] = {00, 01, 81};
int b[] = {0, 1, 2025, 3025, 9801};
int c[] = {0, 1, 88209, 494209, 998001};
int d[] = {0, 1, 4941729, 7441984, 24502500, 25502500, 52881984, 60481729, 99980001};
int i, n, t;
while (scanf("%d", &n) == 1) {
if (n == 2) {
for (i = 0; i < 3; i++) printf("%02d\n", a[i]);
} else if (n == 4) {
for (i = 0; i < 5; i++) printf("%04d\n", b[i]);
} else if (n == 6) {
for (i = 0; i < 5; i++) printf("%06d\n", c[i]);
} else if (n == 8) {
for (i = 0; i < 9; i++) printf("%08d\n", d[i]);
}
}
return 0;
}