buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k | change_count int64 0 100 |
|---|---|---|---|---|---|
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>
#include <algorithm>
#include <bitset>
#include <complex>
#include <list>
#in... |
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <memory>
#include <string>
#include <algorithm>
#include <bitset>
#include <complex>
#include <list>
#in... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 944 | 2 |
def get_all_index(a, value)
index = []
_a = a.dup
while _a.include?(value)
next_i = _a.index(value)
index << next_i
_a[next_i] = nil
end
index
end
n = gets.to_i
virgin = true
n.times do
puzzle = [] # Taro's answer
errata = [] # errata for Taro
puts "" unless virgin
9.times do
puz... | def get_all_index(a, value)
index = []
_a = a.dup
while _a.include?(value)
next_i = _a.index(value)
index << next_i
_a[next_i] = nil
end
index
end
n = gets.to_i
virgin = true
n.times do
puzzle = []
errata = []
puts "" unless virgin
9.times do
puzzle << gets.split.map(&:to_i)
... | [["+", 0, 652, 196, 737, 8, 736, 0, 662, 31, 22], ["+", 0, 652, 196, 737, 8, 736, 0, 662, 0, 32], ["+", 196, 737, 8, 736, 0, 662, 12, 516, 0, 70], ["+", 196, 737, 8, 736, 0, 662, 12, 516, 0, 73]] | 4 | 457 | 4 |
R=[0,3,6]
N=list(range(9))
Z=[0]*9
n=eval(input())
while n:
M=[]
F=[[" " for _ in Z] for _ in Z]
M=[list(map(int,input().split())) for _ in Z]
M1=[[M[y][x] for y in N] for x in N]
M2=[[M[y][x:x+3]+M[y+1][x:x+3]+M[y+2][x:x+3]] for x in R for y in R]
for y in N:
A=M[y]
for x in N:
A1=M2[x/3+y/3... | R=[0,3,6]
N=list(range(9))
Z=[0]*9
n=eval(input())
while n:
M=[]
F=[[" " for _ in Z] for _ in Z]
M=[list(map(int,input().split())) for _ in Z]
M1=[[M[y][x] for y in N] for x in N]
M2=[M[y][x:x+3]+M[y+1][x:x+3]+M[y+2][x:x+3] for y in R for x in R]
for y in N:
A=M[y]
for x in N:
A1=M2[x/3+y/3*3... | [["-", 0, 1, 0, 662, 12, 658, 8, 634, 0, 70], ["-", 0, 1, 0, 662, 12, 658, 8, 634, 0, 73], ["-", 0, 1, 0, 662, 12, 658, 0, 659, 31, 22], ["+", 0, 1, 0, 662, 12, 658, 0, 659, 31, 22]] | 5 | 293 | 6 |
import java.util.Scanner;
public class Main {
public static void main(String arg[]) {
Scanner in = new Scanner(System.in);
String str[][] = {
{},
{"", "a", "b", "c", "d", "e"},
{"", "f", "g", "h", "i", "j"},
{"", "k", "l", "m", "n", "o"},
{"", "p", "q", "r", "s", "t"},
... | import java.util.Scanner;
public class Main {
public static void main(String arg[]) {
Scanner in = new Scanner(System.in);
String str[][] = {
{},
{"", "a", "b", "c", "d", "e"},
{"", "f", "g", "h", "i", "j"},
{"", "k", "l", "m", "n", "o"},
{"", "p", "q", "r", "s", "t"},
... | [["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 19]] | 3 | 407 | 4 |
#include <stdio.h>
#include <string.h>
char table[6][7] = {
{'0', '0', '0', '0', '0', '0', '0'}, {'0', 'a', 'f', 'k', 'p', 'u', 'z'},
{'0', 'b', 'g', 'l', 'q', 'v', '.'}, {'0', 'c', 'g', 'm', 'r', 'w', '?'},
{'0', 'd', 'i', 'n', 's', 'x', '!'}, {'0', 'e', 'j', 'o', 't', 'y', ' '},
};
int main() {
char s... | #include <stdio.h>
#include <string.h>
char table[6][7] = {
{'0', '0', '0', '0', '0', '0', '0'}, {'0', 'a', 'f', 'k', 'p', 'u', 'z'},
{'0', 'b', 'g', 'l', 'q', 'v', '.'}, {'0', 'c', 'h', 'm', 'r', 'w', '?'},
{'0', 'd', 'i', 'n', 's', 'x', '!'}, {'0', 'e', 'j', 'o', 't', 'y', ' '},
};
int main() {
char s... | [["-", 49, 50, 51, 83, 0, 83, 0, 103, 0, 125], ["+", 49, 50, 51, 83, 0, 83, 0, 103, 0, 125], ["-", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 50, 49, 80, 81, 13]] | 0 | 439 | 4 |
#include <stdio.h>
int main() {
char s[203];
char c[6][6] = {{"abcde"}, {"fghij"}, {"klmno"},
{"pqrst"}, {"uvwxy"}, {"z.?! "}};
int i;
while (fgets(s, 202, stdin) != NULL) {
char b[102] = {0};
for (i = 0; s[i] != 10; i += 2) {
if (0 <= s[i] - '0' && s[i] - '0' <= 6 && 0 <= s[i + ... | #include <stdio.h>
int main() {
char s[203];
char c[6][6] = {{"abcde"}, {"fghij"}, {"klmno"},
{"pqrst"}, {"uvwxy"}, {"z.?! "}};
int i;
while (fgets(s, 202, stdin) != NULL) {
char b[102] = {0};
for (i = 0; s[i] != 10; i += 2) {
if (1 <= s[i] - '0' && s[i] - '0' <= 6 && 1 <= s[i + ... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 31, 13], ["-", 15, 23, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 31, 13]] | 0 | 241 | 4 |
#include <stdio.h>
#include <string.h>
const char *table[] = {
"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! ",
};
int main(void) {
char msg[256];
while (~scanf("%s", msg)) {
int i;
char decode[256] = {0};
int len = strlen(msg);
if (len % 2) {
puts("NA");
continue;
}
... | #include <stdio.h>
#include <string.h>
const char *table[] = {
"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! ",
};
int main(void) {
char msg[256];
while (~scanf("%s", msg)) {
int i;
char decode[256] = {0};
int len = strlen(msg);
if (len % 2) {
puts("NA");
continue;
}
... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 0 | 216 | 2 |
#include <stdio.h>
#define A 0
#define B 1
int main(void) {
int i, a, b;
int mode;
char str[210];
char ans[105];
while (scanf("%s", str) != EOF) {
mode = A;
for (i = 0; str[i] != 0; i++) {
if (str[i] < '1' || '6' < str[i]) {
mode = B;
break;
}
if (mode == A) {
... | #include <stdio.h>
#define A 0
#define B 1
int main(void) {
int i, a, b;
int mode;
char str[210];
char ans[105];
while (scanf("%s", str) != EOF) {
mode = A;
for (i = 0; str[i] != 0; i++) {
if (str[i] < '1' || '6' < str[i]) {
mode = B;
break;
}
if (mode == A) {
... | [["+", 0, 57, 15, 23, 0, 16, 12, 103, 0, 104], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117]] | 0 | 347 | 4 |
/*
AizuOnline A0127
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
// Global data section
char msg[401];
char cvtmsg[201];
//
conv(char n1, char n2) {
int r;
if (n1 < '0' || n1 > '6' || n2 < '0' || n2 > '5')
re... | /*
AizuOnline A0127
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
// Global data section
char msg[401];
char cvtmsg[201];
//
conv(char n1, char n2) {
int r;
if (n1 < '1' || n1 > '6' || n2 < '1' || n2 > '5')
re... | [["-", 31, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 31, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["-", 0, 16, 31, 16, 12, 16, 12, 103, 0, 125], ["+", 0, 16, 31, 16, 12, 16, 12, 103, 0, 125]] | 0 | 278 | 4 |
#include <stdio.h>
#include <string.h>
int main() {
char str[250], ans[250],
tmp[10][10] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int i, flg, l, a, cnt;
while (scanf("%s", str) != EOF) {
for (i = 0; i < 240; i++)
ans[i] = 0;
l = strlen(str);
if (l % 2 == 1) {
exit:
... | #include <stdio.h>
#include <string.h>
int main() {
char str[250], ans[250],
tmp[10][10] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int i, flg, l, a, cnt;
while (scanf("%s", str) != EOF) {
for (i = 0; i < 240; i++)
ans[i] = 0;
l = strlen(str);
if (l % 2 == 1) {
exit:
... | [["-", 28, 23, 0, 16, 12, 16, 12, 103, 0, 125], ["+", 28, 23, 0, 16, 12, 16, 12, 103, 0, 125]] | 0 | 261 | 2 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int i;
char code[300], mes[150];
char encode[6][5] = {{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
{'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
{'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int i;
char code[300], mes[150];
char encode[6][5] = {{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
{'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
{'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
... | [["-", 0, 16, 31, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 12, 13]] | 0 | 370 | 4 |
#include <iostream>
using namespace std;
int main() {
string msg;
while (cin >> msg) {
if (msg.length() % 2) {
cout << "NA" << endl;
continue;
}
string res = "";
bool OK = true;
for (int i = 0; i < msg.length(); i += 2) {
int x = msg[i] - '0', y = msg[i + 1] - '0';
if (x... | #include <iostream>
using namespace std;
int main() {
string msg;
while (cin >> msg) {
if (msg.length() % 2) {
cout << "NA" << endl;
continue;
}
string res = "";
bool OK = true;
for (int i = 0; i < msg.length(); i += 2) {
int x = msg[i] - '0', y = msg[i + 1] - '0';
if (x... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 285 | 2 |
#include <bits/stdc++.h>
using namespace std;
char table[5][6] = {{'a', 'f', 'k', 'p', 'u', 'z'},
{'b', 'g', 'l', 'q', 'v', '.'},
{'c', 'h', 'm', 'r', 'w', '?'},
{'d', 'i', 'n', 's', 'x', '!'},
{'e', 'j', 'o', 't', 'y', ' '}};
main() {
... | #include <bits/stdc++.h>
using namespace std;
char table[5][6] = {{'a', 'f', 'k', 'p', 'u', 'z'},
{'b', 'g', 'l', 'q', 'v', '.'},
{'c', 'h', 'm', 'r', 'w', '?'},
{'d', 'i', 'n', 's', 'x', '!'},
{'e', 'j', 'o', 't', 'y', ' '}};
main() {
... | [["-", 51, 16, 31, 16, 31, 16, 31, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 12, 13], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13]] | 1 | 347 | 4 |
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
char w[8][7] = {{"abcde"}, {"fghij"}, {"klmno"},
{"pqrst"}, {"uvwxy"}, {"z.?! "}};
string st;
while (cin >> st) {
bool f = true;
char W[200] = {};
if (st.size() % 2 == 1)
cout << "NA" <... | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
char w[8][7] = {{"abcde"}, {"fghij"}, {"klmno"},
{"pqrst"}, {"uvwxy"}, {"z.?! "}};
string st;
while (cin >> st) {
bool f = true;
char W[200] = {};
if (st.size() % 2 == 1)
cout << "NA" <... | [["-", 51, 16, 31, 16, 31, 16, 31, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 12, 13]] | 1 | 225 | 2 |
#include <iostream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <string>
#include <cmath>
#include <list>
#include <cstdlib>
#include <set>
using namespace std;
int in() {
int x;
cin >> x;
return x;
}
template <typename T>
class SegTree
{
public:
int n;
T T_max;
vector<T>... | #include <iostream>
#include <vector>
#include <algorithm>
#include <sstream>
#include <string>
#include <cmath>
#include <list>
#include <cstdlib>
#include <set>
using namespace std;
int in() {
int x;
cin >> x;
return x;
}
template <typename T>
class SegTree
{
public:
int n;
T T_max;
vector<T>... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 501 | 4 |
#include <stdio.h>
#include <string.h>
#pragma warning(disable : 4996)
char c[201], d[101];
int main() {
while (~scanf("%s", c)) {
if (strlen(c) % 2 == 1) {
printf("NA\n");
} else {
bool flag = false;
for (int i = 0; i < strlen(c); i += 2) {
int a = c[i] - 48, b = c[i + 1] - 48;
... | #include <stdio.h>
#include <string.h>
#pragma warning(disable : 4996)
char c[201], d[101];
int main() {
while (~scanf("%s", c)) {
if (strlen(c) % 2 == 1) {
printf("NA\n");
} else {
bool flag = false;
for (int i = 0; i < strlen(c); i += 2) {
int a = c[i] - 48, b = c[i + 1] - 48;
... | [["-", 8, 9, 0, 100, 0, 1, 0, 16, 17, 33], ["+", 8, 9, 0, 100, 0, 1, 0, 11, 17, 32], ["+", 0, 99, 8, 9, 0, 100, 0, 1, 0, 35], ["+", 0, 99, 8, 9, 0, 100, 0, 93, 0, 94]] | 1 | 298 | 4 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define FOR(i, a, b) fo... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define FOR(i, a, b) fo... | [["-", 51, 16, 31, 16, 12, 16, 12, 103, 0, 125], ["+", 51, 16, 31, 16, 12, 16, 12, 103, 0, 125], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 323 | 6 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string str;
char poke[6][6] = {{"abcde"}, {"fghij"}, {"klmno"},
{"pqrst"}, {"uvwxy"}, {"z.?! "}};
while (cin >> str) {
if (str.size() % 2 != 0)
cout << "NA" << endl;
else {
string ans;
bool kawa = 0;
fo... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
char poke[6][6] = {{"abcde"}, {"fghij"}, {"klmno"},
{"pqrst"}, {"uvwxy"}, {"z.?! "}};
while (cin >> str) {
if (str.size() % 2 != 0)
cout << "NA" << endl;
else {
string ans;
bool kawa = 0;
fo... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 229 | 2 |
// clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecis... | // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecis... | [["-", 15, 339, 51, 16, 12, 16, 31, 103, 0, 125], ["+", 15, 339, 51, 16, 12, 16, 31, 103, 0, 125]] | 1 | 516 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string str[6] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
string str2;
while (cin >> str2) {
if (str2.size() % 2 == 1)
cout << "NA" << endl;
else {
string ans = "";
for (int i = 0; i < str2.size(); i += 2) {
if ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str[6] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
string str2;
while (cin >> str2) {
if (str2.size() % 2 == 1)
cout << "NA" << endl;
else {
string ans = "";
for (int i = 0; i < str2.size(); i += 2) {
if ... | [["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 94], ["+", 0, 57, 75, 76, 0, 9, 0, 93, 0, 35]] | 1 | 201 | 2 |
#include <iostream>
#include <string>
using namespace std;
int main() {
char tb[9][9];
for (int i = 1; i <= 7; i++)
for (int j = 1; j <= 6; j++)
tb[i][j] = 'a' + (5 * (i - 1) + j - 1);
tb[6][2] = '.';
tb[6][3] = '?';
tb[6][4] = '!';
tb[6][5] = ' ';
string b;
while (cin >> b) {
string re... | #include <iostream>
#include <string>
using namespace std;
int main() {
char tb[9][9];
for (int i = 1; i <= 7; i++)
for (int j = 1; j <= 6; j++)
tb[i][j] = 'a' + (5 * (i - 1) + j - 1);
tb[6][2] = '.';
tb[6][3] = '?';
tb[6][4] = '!';
tb[6][5] = ' ';
string b;
while (cin >> b) {
string re... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 106], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 264 | 4 |
#include <iostream>
#include <string>
using namespace std;
int main(void) {
const char *table[] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
while (true) {
bool bNA = false;
string s;
cin >> s;
if (cin.eof())
break;
if (s.length() % 2 == 1) {
bNA = true;
goto NA;
... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
const char *table[] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
while (true) {
bool bNA = false;
string s;
cin >> s;
if (cin.eof())
break;
if (s.length() % 2 == 1) {
bNA = true;
goto NA;
... | [["-", 31, 91, 28, 23, 0, 16, 12, 16, 12, 13], ["+", 31, 91, 28, 23, 0, 16, 12, 16, 12, 13], ["-", 12, 91, 28, 23, 0, 16, 12, 16, 12, 13], ["+", 12, 91, 28, 23, 0, 16, 12, 16, 12, 13]] | 1 | 267 | 4 |
#include <iostream>
using namespace std;
char s[6][6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int main(void) {
string str;
while (cin >> str) {
if (str.length() % 2 == 1) {
cout << "NA\n";
continue;
}
string ans = "";
bool flg = false;
for (int i = 0; i < str.len... | #include <iostream>
using namespace std;
char s[6][6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int main(void) {
string str;
while (cin >> str) {
if (str.length() % 2 == 1) {
cout << "NA\n";
continue;
}
string ans = "";
bool flg = false;
for (int i = 0; i < str.len... | [["-", 15, 339, 51, 16, 12, 16, 12, 103, 0, 125], ["+", 15, 339, 51, 16, 12, 16, 12, 103, 0, 125]] | 1 | 222 | 2 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string nums, text, ch;
ch = "abcdefghijklmnopqrstuvwxyz.?! ";
while (cin >> nums) {
text = "";
if (nums.size() % 2) {
cout << "NA" << endl;
} else {
for (int i = 0; i < nums.size() / 2; i++) {
if ('0' < nums[i ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string nums, text, ch;
ch = "abcdefghijklmnopqrstuvwxyz.?! ";
while (cin >> nums) {
text = "";
if (nums.size() % 2) {
cout << "NA" << endl;
} else {
for (int i = 0; i < nums.size() / 2; i++) {
if ('0' < nums[i ... | [["-", 15, 339, 51, 16, 12, 16, 12, 103, 0, 125], ["+", 15, 339, 51, 16, 12, 16, 12, 103, 0, 125]] | 1 | 188 | 2 |
#include <iostream>
#include <string>
using namespace std;
string mp[6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int main() {
string s;
while (cin >> s) {
if (s.length() % 2) {
cout << "NA" << endl;
continue;
}
string res = "";
for (int i = 0; i < s.length(); i += 2) ... | #include <iostream>
#include <string>
using namespace std;
string mp[6] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
int main() {
string s;
while (cin >> s) {
if (s.length() % 2) {
cout << "NA" << endl;
continue;
}
string res = "";
for (int i = 0; i < s.length(); i += 2) ... | [["-", 51, 16, 31, 16, 12, 16, 12, 103, 0, 125], ["+", 51, 16, 31, 16, 12, 16, 12, 103, 0, 125]] | 1 | 201 | 2 |
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include... | [["-", 15, 339, 51, 16, 31, 16, 12, 103, 0, 125], ["+", 15, 339, 51, 16, 31, 16, 12, 103, 0, 125]] | 1 | 378 | 2 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
char c[] = {'z', '.', '?', '!', ' '};
string s;
int main() {
w... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
char c[] = {'z', '.', '?', '!', ' '};
string s;
int main() {
w... | [["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]] | 1 | 241 | 2 |
#include <iostream>
#include <string>
#define rep(i, x) for (int i = 0; i < x; i++)
using namespace std;
string s;
char tab[10][10] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "x.?! "};
void solve() {
int n = 0, k = 0;
char ans[1000];
if (s.size() % 2 != 0) {
cout << "NA" << endl;
return;
} else {
... | #include <iostream>
#include <string>
#define rep(i, x) for (int i = 0; i < x; i++)
using namespace std;
string s;
char tab[10][10] = {"abcde", "fghij", "klmno", "pqrst", "uvwxy", "z.?! "};
void solve() {
int n = 0, k = 0;
char ans[1000];
if (s.size() % 2 != 0) {
cout << "NA" << endl;
return;
} else {
... | [["-", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 83, 0, 5, 0, 6]] | 1 | 245 | 2 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
char table[20][20];
string str;
for (int i = 1; i <= 6; i++) {
for (int j = 1; j <= 5; j++) {
table[j][i] = 'a' + 5 * (i - 1) + (j - 1);
if (i == 6 && j == 1)
break;
}
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
char table[20][20];
string str;
for (int i = 1; i <= 6; i++) {
for (int j = 1; j <= 5; j++) {
table[j][i] = 'a' + 5 * (i - 1) + (j - 1);
if (i == 6 && j == 1)
break;
}
... | [["-", 15, 339, 51, 16, 12, 16, 12, 103, 0, 125], ["+", 15, 339, 51, 16, 12, 16, 12, 103, 0, 125]] | 1 | 322 | 2 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
using nam... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
using nam... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 445 | 4 |
#include <iostream>
using namespace std;
int main() {
char g[42] = {97, 102, 107, 112, 117, 122, 98, 103, 108, 113,
118, 46, 99, 104, 109, 114, 119, 63, 100, 105,
110, 115, 120, 33, 101, 106, 111, 116, 121, 32};
string s, a;
while (cin >> s, !cin.eof()) {
for (int i = 0; ... | #include <iostream>
using namespace std;
main() {
char g[42] = {97, 102, 107, 112, 117, 122, 98, 103, 108, 113,
118, 46, 99, 104, 109, 114, 119, 63, 100, 105,
110, 115, 120, 33, 101, 106, 111, 116, 121, 32};
string s, a;
while (cin >> s, !cin.eof()) {
a = "";
for (int... | [["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 5, 0, 62], ["+", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 201 | 6 |
#include <iostream>
using namespace std;
char table[6][5] = {
{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
{'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
{'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
int temp[2];
int main() {
string mes;
while (cin >> mes) {
if (mes.l... | #include <iostream>
using namespace std;
char table[6][5] = {
{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
{'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
{'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
int temp[2];
int main() {
string mes;
while (cin >> mes) {
if (mes.l... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 345 | 2 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include... | [["-", 31, 16, 31, 16, 31, 16, 31, 103, 0, 125], ["+", 31, 16, 31, 16, 31, 16, 31, 103, 0, 125], ["-", 51, 16, 31, 16, 31, 16, 31, 16, 17, 18], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 19], ["-", 51, 16, 31, 16, 12, 16, 31, 103, 0, 125], ["+", 51, 16, 31, 16, 12, 16, 31, 103, 0, 125], ["-", 15, 339, 51, 16, 31, 16, 12... | 1 | 425 | 10 |
#include <iostream>
using namespace std;
char table[5][6] = {
{'a', 'f', 'k', 'p', 'u', 'z'},
{'b', 'g', 'l', 'q', 'v', '.'},
{'c', 'h', 'm', 'r', 'w', '?'},
{'d', 'i', 'n', 's', 'x', '!'},
{'e', 'j', 'o', 't', 'y', ' '}
};
int main() {
string buf;
while (getline(cin, buf)) {
if (buf... | #include <iostream>
using namespace std;
char table[5][6] = {
{'a', 'f', 'k', 'p', 'u', 'z'},
{'b', 'g', 'l', 'q', 'v', '.'},
{'c', 'h', 'm', 'r', 'w', '?'},
{'d', 'i', 'n', 's', 'x', '!'},
{'e', 'j', 'o', 't', 'y', ' '}
};
int main() {
string buf;
while (getline(cin, buf)) {
if (buf... | [["+", 12, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24]] | 1 | 355 | 8 |
#include <iostream>
#include <string>
using namespace std;
int main() {
char map[6][5] = {{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
{'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
{'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
string s;
while (ci... | #include <iostream>
#include <string>
using namespace std;
int main() {
char map[6][5] = {{'a', 'b', 'c', 'd', 'e'}, {'f', 'g', 'h', 'i', 'j'},
{'k', 'l', 'm', 'n', 'o'}, {'p', 'q', 'r', 's', 't'},
{'u', 'v', 'w', 'x', 'y'}, {'z', '.', '?', '!', ' '}};
string s;
while (ci... | [["-", 12, 23, 0, 16, 12, 16, 12, 103, 0, 125], ["+", 12, 23, 0, 16, 12, 16, 12, 103, 0, 125]] | 1 | 334 | 10 |
#include <cstdio>
#include <iostream>
using namespace std;
const string hyou[] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
int main() {
string in;
while (cin >> in) {
cin.ignore();
if (in.size() % 2 == 1) {
cout << "NA" << endl;
continue;
}
bool flag = true;
string ans = "... | #include <cstdio>
#include <iostream>
using namespace std;
const string hyou[] = {"afkpuz", "bglqv.", "chmrw?", "dinsx!", "ejoty "};
int main() {
string in;
while (cin >> in) {
cin.ignore();
if (in.size() % 2 == 1) {
cout << "NA" << endl;
continue;
}
bool flag = true;
string ans = "... | [["-", 28, 23, 0, 16, 12, 16, 12, 103, 0, 125], ["+", 28, 23, 0, 16, 12, 16, 12, 103, 0, 125]] | 1 | 225 | 2 |
#include <iostream>
#include <string>
const char symbol[4] = {'.', '?', '!', ' '};
int main() {
std::string s;
while (std::cin >> s) {
if (s.size() & 1)
std::cout << "NA" << std::endl;
else {
std::string res;
bool f = true;
for (int i = 0; i < s.size(); i += 2) {
if (s[i] ... | #include <iostream>
#include <string>
const char symbol[4] = {'.', '?', '!', ' '};
int main() {
std::string s;
while (std::cin >> s) {
if (s.size() & 1)
std::cout << "NA" << std::endl;
else {
std::string res;
bool f = true;
for (int i = 0; i < s.size(); i += 2) {
if (s[i] ... | [["-", 31, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["+", 31, 16, 31, 16, 31, 16, 12, 103, 0, 125], ["-", 51, 16, 31, 16, 12, 16, 12, 103, 0, 125], ["+", 51, 16, 31, 16, 12, 16, 12, 103, 0, 125]] | 1 | 238 | 4 |
#include <bits/stdc++.h>
using namespace std;
const string characters = "abcdefghijklmnopqrstuvwxyz.?! ";
string convert(const string &number) {
if (number.size() & 1)
return "NA";
string res = "";
for (unsigned i = 0; i < number.size(); i += 2) {
if (!('1' <= number[i] && number[i] <= '6'))
retu... | #include <bits/stdc++.h>
using namespace std;
const string characters = "abcdefghijklmnopqrstuvwxyz.?! ";
string convert(const string &number) {
if (number.size() & 1)
return "NA";
string res = "";
for (unsigned i = 0; i < number.size(); i += 2) {
if (!('1' <= number[i] && number[i] <= '6'))
retu... | [["+", 31, 16, 12, 69, 341, 342, 0, 16, 17, 72], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 206 | 4 |
#include <iostream>
using namespace std;
int main() {
int i, p, q;
bool b;
char buf[201];
char code[5][6] = {
{'a', 'f', 'k', 'p', 'u', 'z'}, {'b', 'g', 'l', 'l', 'q', 'v'},
{'c', 'h', 'm', 'r', 'w', '?'}, {'d', 'i', 'n', 's', 'x', '!'},
{'e', 'j', 'o', 't', 'y', ' '},
};
while (cin.getl... | #include <iostream>
using namespace std;
int main() {
int i, p, q;
bool b;
char buf[201];
char code[5][6] = {
{'a', 'f', 'k', 'p', 'u', 'z'}, {'b', 'g', 'l', 'q', 'v', '.'},
{'c', 'h', 'm', 'r', 'w', '?'}, {'d', 'i', 'n', 's', 'x', '!'},
{'e', 'j', 'o', 't', 'y', ' '},
};
while (cin.getl... | [["-", 49, 50, 51, 83, 0, 83, 0, 103, 0, 125], ["+", 49, 50, 51, 83, 0, 83, 0, 103, 0, 125]] | 1 | 362 | 6 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char field[6][11];
char a = 'a';
for (int i = 1; i < 7; i++) {
for (int j = 1; j < 6; j++) {
field[j][i] = a;
a++;
}
}
field[2][6] = '.';
field[3][6] = '?';
field[4][6] = '!';
field[5][6] = ' ';
string input;
while (cin... | #include <bits/stdc++.h>
using namespace std;
int main() {
char field[6][11];
char a = 'a';
for (int i = 1; i < 7; i++) {
for (int j = 1; j < 6; j++) {
field[j][i] = a;
a++;
}
}
field[2][6] = '.';
field[3][6] = '?';
field[4][6] = '!';
field[5][6] = ' ';
string input;
while (cin... | [["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["-", 8, 9, 0, 57, 64, 9, 0, 116, 0, 35]] | 1 | 278 | 2 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;... | [["-", 51, 16, 31, 16, 31, 16, 31, 16, 17, 18], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 19], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 19]] | 1 | 329 | 4 |
def calc (input)
seet = [[nil],
[nil,"a","b","c","d","e"],
[nil,"f","g","h","i","j"],
[nil,"k","l","m","n","o"],
[nil,"p","q","r","s","t"],
[nil,"u","v","w","x","y"],
[nil,"z",".","?","!"," "]
]
input.gsub!(/\n/,"")
no = input.split("")
no ... | def calc (input)
seet = [[nil],
[nil,"a","b","c","d","e"],
[nil,"f","g","h","i","j"],
[nil,"k","l","m","n","o"],
[nil,"p","q","r","s","t"],
[nil,"u","v","w","x","y"],
[nil,"z",".","?","!"," "]
]
input.gsub!(/\n/,"")
no = input.split("")
no ... | [["+", 36, 36, 36, 36, 0, 493, 0, 89, 0, 89], ["+", 36, 36, 0, 493, 0, 89, 8, 170, 0, 444]] | 4 | 255 | 2 |
def maje_table
i = 0
j = 0
table = Array.new(6)
table.map!{Array.new(5)}
"a".upto("z") do |c|
table[i][j] = c
j += 1
i += 1 if j == 5
j = 0 if j == 5
end
table[5][1] = '.'
table[5][2] = '?'
table[5][3] = '!'
table[5][4] = ' '
table
end
$table = make_table
readlines.each do |in... | def make_table
i = 0
j = 0
table = Array.new(6)
table.map!{Array.new(5)}
"a".upto("z") do |c|
table[i][j] = c
j += 1
i += 1 if j == 5
j = 0 if j == 5
end
table[5][1] = '.'
table[5][2] = '?'
table[5][3] = '!'
table[5][4] = ' '
table
end
$table = make_table
readlines.each do |in... | [["-", 36, 36, 36, 36, 0, 493, 0, 735, 141, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 735, 141, 22]] | 4 | 240 | 2 |
import sys
s = 'abcdefghijklmnopqrstuvwxyz.?! '
d = {}
for y in range(1, 7):
for t in range(1, 6):
d[(str(y),str(t))] = s[0]
s = s[1:]
for line in sys.stdin:
line = line.rstrip()
if len(line) % 2 != 0:
print('NA')
continue
ans = ''
for i in range(0, len(line), 2):
... | import sys
s = 'abcdefghijklmnopqrstuvwxyz.?! '
d = {}
for y in range(1, 7):
for t in range(1, 6):
d[(str(y),str(t))] = s[0]
s = s[1:]
for line in sys.stdin:
line = line.rstrip()
if len(line) % 2 != 0:
print('NA')
continue
ans = ''
for i in range(0, len(line), 2):
... | [["-", 0, 7, 8, 196, 0, 57, 15, 206, 51, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 206, 0, 70], ["-", 0, 7, 8, 196, 0, 57, 15, 206, 0, 73], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 267], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22]] | 5 | 158 | 5 |
# Aizu Problem 00127: Pocket Pager Input
#
import sys, math, os, copy
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
code = {1: "afkpuz", 2: "ablqv.", 3: "chmrw?", 4: "dinsx!", 5: "ejoty "}
def pocket_pager(string):
if len(string) % 2 == 1:
... | # Aizu Problem 00127: Pocket Pager Input
#
import sys, math, os, copy
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
code = {1: "afkpuz", 2: "bglqv.", 3: "chmrw?", 4: "dinsx!", 5: "ejoty "}
def pocket_pager(string):
if len(string) % 2 == 1:
... | [["-", 0, 662, 12, 680, 0, 569, 51, 557, 0, 6], ["+", 0, 662, 12, 680, 0, 569, 51, 557, 0, 6]] | 5 | 188 | 2 |
dic = {}
base = ord("a")
for x in range(5):
for y in range(5):
dic[(x + 1, y + 1)] = chr(base + x * 5 + y)
dic[(6, 1)] = "z"
dic[(6, 2)] = "."
dic[(6, 3)] = "?"
dic[(6, 4)] = "!"
dic[(6, 5)] = " "
def to_mess(nums):
if len(nums) % 2 == 1:
return "NA"
mess = ""
for i in range(0, len(nums), 2):
x,... | dic = {}
base = ord("a")
for x in range(5):
for y in range(5):
dic[(x + 1, y + 1)] = chr(base + x * 5 + y)
dic[(6, 1)] = "z"
dic[(6, 2)] = "."
dic[(6, 3)] = "?"
dic[(6, 4)] = "!"
dic[(6, 5)] = " "
def to_mess(nums):
if len(nums) % 2 == 1:
return "NA"
mess = ""
for i in range(0, len(nums), 2):
x,... | [["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 57, 75, 76, 8, 196, 0, 37, 0, 38], ["+", 75, 76, 8, 196, 0, 37, 0, 557, 0, 654], ["+", 75, 76, 8, 196, 0, 37, 0, 557, 0, 6], ["+", 75, 76, 8, 196, 0, 37, 0, 557, 0, 655]] | 5 | 209 | 6 |
decode = ["afkpuz",
"bglqv.",
"chmrw?",
"dinsx!",
"ejoty "]
while True:
try:
line = list(map(int,list(input())))
except EOFError:
break
if len(line)%2 == 1:
print("NA")
continue
try:
print("".join(decode[j-1][i-1]
... | decode = ["afkpuz",
"bglqv.",
"chmrw?",
"dinsx!",
"ejoty "]
while True:
try:
line = list(map(int,list(input())))
except EOFError:
break
if len(line)%2 == 1 or 0 in line:
print("NA")
continue
try:
print("".join(decode[j-1][i-... | [["+", 0, 52, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 267], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22]] | 5 | 118 | 4 |
#include <stdio.h>
int out[6];
int main(void) {
int n, i, j;
float h;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%f", &h);
if (185.0 < h)
out[5]++;
else if (180.0 < h)
out[4]++;
else if (175.0 < h)
out[3]++;
else if (170.0 < h)
out[2]++;
else if (165.0 <... | #include <stdio.h>
int out[6];
int main(void) {
int n, i, j;
float h;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%f", &h);
if (185.0 < h)
out[5]++;
else if (180.0 <= h)
out[4]++;
else if (175.0 <= h)
out[3]++;
else if (170.0 <= h)
out[2]++;
else if (165.... | [["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 19]] | 0 | 198 | 8 |
#include <stdio.h>
int main(void) {
int a;
float b;
int c[6] = {0};
int i;
int j;
scanf("%d", &a);
for (i = 0; i < a; i++) {
scanf("%f", &b);
if (b < 165.5) {
c[0]++;
} else if (b < 170.0) {
c[1]++;
} else if (b < 175.0) {
c[2]++;
} else if (b < 180.0) {
c[3... | #include <stdio.h>
int main(void) {
int n;
float b;
int c[6] = {0};
int i;
int j;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%f", &b);
if (b < 165.0) {
c[0]++;
} else if (b < 170.0) {
c[1]++;
} else if (b < 175.0) {
c[2]++;
} else if (b < 180.0) {
c[3... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 66, 28, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0... | 0 | 212 | 8 |
#include <stdio.h>
int main(void) {
int n;
double h;
int hight[6] = {};
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%lf", &h);
if (h < 165.0) {
hight[0]++;
} else if (h >= 165.0 && h < 170.0) {
hight[1]++;
} else if (h >= 170.0 && h < 175.0) {
hight[2]++;
} el... | #include <stdio.h>
int main(void) {
int n;
double h;
int hight[6] = {};
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%lf", &h);
if (h < 165.0) {
hight[0]++;
} else if (h >= 165.0 && h < 170.0) {
hight[1]++;
} else if (h >= 170.0 && h < 175.0) {
hight[2]++;
} el... | [["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 228 | 2 |
#include <stdio.h>
int hist[6];
int main() {
int i, j, n;
double t;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf", &t);
if (t < 165.0) {
hist[0]++;
} else if (t >= 185.0) {
hist[5]++;
} else {
hist[(int)((t - 165.0) / 5.0) + 1]++;
}
}
for (i = 0; i < 6; i++) ... | #include <stdio.h>
int hist[6];
int main() {
int i, j, n;
double t;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf", &t);
if (t < 165.0) {
hist[0]++;
} else if (t >= 185.0) {
hist[5]++;
} else {
hist[(int)((t - 165.0) / 5.0) + 1]++;
}
}
for (i = 0; i < 6; i++) ... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 169 | 2 |
#include <stdio.h>
int main() {
int i;
int n;
int a[6];
double b;
int j;
for (i = 0; i < 6; i++) {
a[i] = 0;
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf", &b);
if (b < 165.0) {
a[0]++;
} else if (b < 170.0) {
a[1]++;
} else if (b < 175.0) {
a[2]++;
... | #include <stdio.h>
int main() {
int i;
int n;
int a[6];
double b;
int j;
for (i = 0; i < 6; i++) {
a[i] = 0;
}
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf", &b);
if (b < 165.0) {
a[0]++;
} else if (b < 170.0) {
a[1]++;
} else if (b < 175.0) {
a[2]++;
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 234 | 2 |
#include <stdio.h>
int main() {
int n, i, j, t[7] = {};
float s;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%f", &s);
if (s < 165.0) {
t[1]++;
} else if (s >= 165.0 && s < 170.0) {
t[2]++;
} else if (s >= 170.0 && s < 175.0) {
t[3]++;
} else if (s >= 175.0 && s... | #include <stdio.h>
int main() {
int n, i, j, t[7] = {};
float s;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%f", &s);
if (s < 165.0) {
t[1]++;
} else if (s >= 165.0 && s < 170.0) {
t[2]++;
} else if (s >= 170.0 && s < 175.0) {
t[3]++;
} else if (s >= 175.0 && s... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 225 | 2 |
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
int n, list[6];
double h;
int main() {
for (scanf("%d", &n); n > 0; n--) {
scanf("%lf", &h);
if (h < 165.0)
list[0]++;
else if (h < 170.0)
list[1]++;
else if (h < 175.0)
list[2]++;
else if (h < 180.0)
list[3]++;
... | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
int n, list[6];
double h;
int main() {
for (scanf("%d", &n); n > 0; n--) {
scanf("%lf", &h);
if (h < 165.0)
list[0]++;
else if (h < 170.0)
list[1]++;
else if (h < 175.0)
list[2]++;
else if (h < 180.0)
list[3]++;
... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 182 | 2 |
#include <stdio.h>
int lank[6], n, i;
int main(void) {
double h;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf", &h);
if (h < 165.5) {
lank[0]++;
} else if (h < 170) {
lank[1]++;
} else if (h < 175) {
lank[2]++;
} else if (h < 180) {
lank[3]++;
} else i... | #include <stdio.h>
int lank[6], n, i;
int main(void) {
double h;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%lf", &h);
if (h < 165.0) {
lank[0]++;
} else if (h < 170) {
lank[1]++;
} else if (h < 175) {
lank[2]++;
} else if (h < 180) {
lank[3]++;
} else i... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 203 | 2 |
#include <stdio.h>
int main() {
int n, fd[6] = {}, i, j;
double height;
scanf("%d", &n);
while (n--) {
scanf("%lf", &height);
if (height >= 185.0)
fd[5]++;
else if (height >= 180.0)
fd[4]++;
else if (height >= 175.0)
fd[3]++;
else if (height >= 170.0)
fd[2]++;
el... | #include <stdio.h>
int main() {
int n, fd[6] = {}, i, j;
double height;
scanf("%d", &n);
while (n--) {
scanf("%lf", &height);
if (height >= 185.0)
fd[5]++;
else if (height >= 180.0)
fd[4]++;
else if (height >= 175.0)
fd[3]++;
else if (height >= 170.0)
fd[2]++;
e... | [["-", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 12, 13]] | 0 | 182 | 2 |
#include <stdio.h>
int main() {
int n[8] = {}, N, x, y;
scanf("%d", &N);
for (int i = 0; i < N; i++) {
scanf("%d.%d", &x, &y);
if (185 <= x)
n[6]++;
else if (180 <= x)
n[5]++;
else if (175 <= x)
n[4]++;
else if (170 <= x)
n[3]++;
else if (165 <= x)
n[2]++;
... | #include <stdio.h>
int main() {
int n[8] = {}, N, x, y;
scanf("%d", &N);
for (int i = 0; i < N; i++) {
scanf("%d.%d", &x, &y);
if (185 <= x)
n[6]++;
else if (180 <= x)
n[5]++;
else if (175 <= x)
n[4]++;
else if (170 <= x)
n[3]++;
else if (165 <= x)
n[2]++;
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 200 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
#define mp make_pai... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <time.h>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
#define mp make_pai... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 201 | 2 |
#include <iostream>
using namespace std;
int n, w[7], b;
double a;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a;
b = (a - 155.0) / 2;
if (b < 1) {
b = 1;
}
if (b > 6) {
b = 6;
}
w[b]++;
}
for (int i = 1; i <= 6; i++) {
cout << i << ':';
for (int j... | #include <iostream>
using namespace std;
int n, w[7], b;
double a;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a;
b = (a - 155.0) / 5;
if (b < 1) {
b = 1;
}
if (b > 6) {
b = 6;
}
w[b]++;
}
for (int i = 1; i <= 6; i++) {
cout << i << ':';
for (int j... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]] | 1 | 145 | 2 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, a, b[6] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a;
if (a < 165)
b[0]++;
if (a >= 165 && a < 170)
b[1]++;
if (a >= 170 && a < 175)
b[2]++;
if (a >= 175 && a < 180)
b[3]++;
if... | #include <iostream>
#include <string>
using namespace std;
int main() {
double n, a, b[6] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a;
if (a < 165)
b[0]++;
if (a >= 165 && a < 170)
b[1]++;
if (a >= 170 && a < 175)
b[2]++;
if (a >= 175 && a < 180)
b[3]++;
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 196 | 2 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define FOR(i, a, b) fo... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define FOR(i, a, b) fo... | [["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 223 | 2 |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, cnt[6] = {0};
float h;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> h;
if (h < 165.0) {
cnt[0]++;
} else if (h < 170.0) {
cnt[1]++;
} else if (h < 175.0) {
cnt[2]++;
} else if... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, cnt[6] = {0};
float h;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> h;
if (h < 165.0) {
cnt[0]++;
} else if (h < 170.0) {
cnt[1]++;
} else if (h < 175.0) {
cnt[2]++;
} else if... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 194 | 2 |
#include <iostream>
using namespace std;
int main() {
int length[6];
for (int i = 0; i < 6; i++) {
length[i] = 0;
}
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double l;
cin >> l;
if (l < 165.0)
length[0]++;
else if (l < 170.0)
length[1]++;
else if (l < 175.0)
l... | #include <iostream>
using namespace std;
int main() {
int length[6];
for (int i = 0; i < 6; i++) {
length[i] = 0;
}
int n;
cin >> n;
for (int i = 0; i < n; i++) {
double l;
cin >> l;
if (l < 165.0)
length[0]++;
else if (l < 170.0)
length[1]++;
else if (l < 175.0)
l... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 198 | 2 |
#include <cstdio>
#include <vector>
using namespace std;
int main() {
int n;
while (~scanf("%d", &n)) {
vector<int> g(6, 0);
for (int i = 0; i < n; ++i) {
double h;
scanf("%lf", &h);
if (h < 165.0)
++g[0];
else if (h < 170.0)
++g[1];
else if (h < 175.0)
... | #include <cstdio>
#include <vector>
using namespace std;
int main() {
int n;
while (~scanf("%d", &n)) {
vector<int> g(6, 0);
for (int i = 0; i < n; ++i) {
double h;
scanf("%lf", &h);
if (h < 165.0)
++g[0];
else if (h < 170.0)
++g[1];
else if (h < 175.0)
... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 201 | 2 |
#include <iostream>
using namespace std;
int p[7];
int main() {
int num;
float height;
for (int i = 0; i < 8; i++)
p[i] = 0;
cin >> num;
for (int i = 0; i < num; i++) {
cin >> height;
if (height < 165.0)
p[1]++;
else if (height < 170.0)
p[2]++;
else if (height < 175.0)
... | #include <iostream>
using namespace std;
int p[7];
int main() {
int num;
float height;
for (int i = 0; i < 8; i++)
p[i] = 0;
cin >> num;
for (int i = 0; i < num; i++) {
cin >> height;
if (height < 165.0)
p[1]++;
else if (height < 170.0)
p[2]++;
else if (height < 175.0)
... | [["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 193 | 2 |
#include <iostream>
using namespace std;
int main() {
long n, aa[6] = {0}, i, j;
double a;
cin >> n;
for (i = 0; i < n; i++) {
cin >> a;
if (a < 165)
aa[0]++;
else if (a < 170)
aa[1]++;
else if (a < 175)
aa[2]++;
else if (a < 180)
aa[3]++;
else if (a < 185)
... | #include <iostream>
using namespace std;
int main() {
long n, aa[6] = {0}, i, j;
double a;
cin >> n;
for (i = 0; i < n; i++) {
cin >> a;
if (a < 165)
aa[0]++;
else if (a < 170)
aa[1]++;
else if (a < 175)
aa[2]++;
else if (a < 180)
aa[3]++;
else if (a < 185)
... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 177 | 2 |
#include <iostream>
using namespace std;
int main() {
int n;
int a[1024];
int r[6] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] < 165)
r[0]++;
else if (a[i] < 170)
r[1]++;
else if (a[i] < 175)
r[2]++;
else if (a[i] < 180)
r[3]++;
else if ... | #include <iostream>
using namespace std;
int main() {
int n;
double a[1024];
int r[6] = {0};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] < 165)
r[0]++;
else if (a[i] < 170)
r[1]++;
else if (a[i] < 175)
r[2]++;
else if (a[i] < 180)
r[3]++;
else ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40]] | 1 | 197 | 2 |
n = int(input())
[out1, out2, out3, out4, out5, out6] = [0 for i in range(6)]
for i in range(n):
k = float(input())
if k < 165.0: out1 += 1
elif 165.0 <= k < 170.0: out2 += 1
elif 170.0 <= k < 175.0: out3 += 1
elif 175.0 <= k < 180.0: out4 += 1
elif 180.0 <= k < 185.0: out5 += 1
elif 185.0 ... | n = int(input())
[out1, out2, out3, out4, out5, out6] = [0 for i in range(6)]
for i in range(n):
k = float(input())
if k < 165.0: out1 += 1
elif 165.0 <= k < 170.0: out2 += 1
elif 170.0 <= k < 175.0: out3 += 1
elif 175.0 <= k < 180.0: out4 += 1
elif 180.0 <= k < 185.0: out5 += 1
elif 185.0 ... | [["-", 8, 196, 0, 57, 75, 665, 15, 666, 667, 20], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 667, 19]] | 5 | 156 | 2 |
histo = ["" for i in range(6)]
n = int(input())
for i in range(n):
h = float(input())
if h < 165.0:
histo[0] += "*"
elif h < 170.0:
histo[1] += "*"
elif h < 175.0:
histo[2] += "*"
elif h < 180.0:
histo[3] += "*"
elif h < 185.0:
histo[4] += "*"
else:
... | histo = ["" for i in range(6)]
n = int(input())
for i in range(n):
h = float(input())
if h < 165.0: histo[0] += "*"
elif h < 170.0: histo[1] += "*"
elif h < 175.0: histo[2] += "*"
elif h < 180.0: histo[3] += "*"
elif h < 185.0: histo[4] += "*"
else : histo[5] += "*"
for i in rang... | [["-", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6], ["+", 3, 4, 0, 657, 12, 660, 0, 657, 17, 72], ["+", 3, 4, 0, 657, 12, 660, 0, 657, 12, 612], ["-", 3, 4, 0, 657, 12, 660, 0, 206, 51, 22], ["+", 3, 4, 0, 657, 12, 660, 0, 206, 51, 22]] | 5 | 135 | 6 |
import java.util.*;
public class Main {
public void doIt() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
for (int i = 0; i < n; i++) {
long num = sc.nextInt();
System.out.println("Case " + count++ + ":");
for (int j = 0; j < 10; j++) {
if (num =... | import java.util.*;
public class Main {
public void doIt() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 1;
for (int i = 0; i < n; i++) {
long num = sc.nextInt();
System.out.println("Case " + count++ + ":");
for (int j = 0; j < 10; j++) {
if (num =... | [["-", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499], ["+", 0, 195, 8, 196, 0, 503, 49, 200, 51, 499]] | 3 | 171 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
for (int i = 0; i < n; i++) {
int x = s.nextInt();
System.out.println("Case" + (i + 1) + ":");
for (int j = 0; j < 10; j++) {
x *= x;
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
for (int i = 0; i < n; i++) {
int x = s.nextInt();
System.out.println("Case " + (i + 1) + ":");
for (int j = 0; j < 10; j++) {
x *= x;
... | [["-", 3, 4, 0, 16, 31, 16, 31, 5, 0, 491], ["+", 3, 4, 0, 16, 31, 16, 31, 5, 0, 491]] | 3 | 149 | 2 |
import java.util.Scanner;
public class Main {
int makeRandom(int value) { return ((value * value) % 1000000) / 100; }
void io() {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
for (int i = 0; i < n; ++i) {
int initial = s.nextInt();
System.out.println("case " + (i + 1) + ":");
... | import java.util.Scanner;
public class Main {
int makeRandom(int value) { return ((value * value) % 1000000) / 100; }
void io() {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
for (int i = 0; i < n; ++i) {
int initial = s.nextInt();
System.out.println("Case " + (i + 1) + ":");
... | [["-", 3, 4, 0, 16, 31, 16, 31, 5, 0, 491], ["+", 3, 4, 0, 16, 31, 16, 31, 5, 0, 491]] | 3 | 164 | 2 |
#include <stdio.h>
int main(void) {
int n;
int s;
int rund;
int i;
int j;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%d", &s);
printf("Case %d:\n", s);
for (j = 0; j < 10; j++) {
s = s * s / 100 % 10000;
printf("%d\n", s);
}
}
return (0);
} | #include <stdio.h>
int main(void) {
int n;
int s;
int rund;
int i;
int j;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%d", &s);
printf("Case %d:\n", i);
for (j = 0; j < 10; j++) {
s = s * s / 100 % 10000;
printf("%d\n", s);
}
}
return (0);
} | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 109 | 2 |
#include <stdio.h>
int main(void) {
int x;
int s;
int n;
int i;
int j;
scanf("%d", &x);
for (i = 0; i < x; i++) {
scanf("%d", &s);
printf("case %d:\n", i + 1);
for (j = 0; j < 10; j++) {
s *= s;
s /= 100;
s %= 10000;
printf("%d\n", s);
}
}
return (0);
} | #include <stdio.h>
int main(void) {
int x;
int s;
int i;
int j;
scanf("%d", &x);
for (i = 0; i < x; i++) {
scanf("%d", &s);
printf("Case %d:\n", i + 1);
for (j = 0; j < 10; j++) {
s *= s;
s /= 100;
s %= 10000;
printf("%d\n", s);
}
}
return (0);
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 113 | 5 |
#include <stdio.h>
int main(void) {
int i, j, repeat, dataset[10];
scanf("%d", &repeat);
for (j = 0; j < repeat; j++) {
scanf("%d", &dataset[j]);
}
for (j = 0; j < repeat; j++) {
printf("Case %d\n", j + 1);
for (i = 0; i < 10; i++) {
dataset[j] = (int)((dataset[j] * dataset[j]) % 1000000) / ... | #include <stdio.h>
int main(void) {
int i, j, repeat, dataset[10];
scanf("%d", &repeat);
for (j = 0; j < repeat; j++) {
scanf("%d", &dataset[j]);
}
for (j = 0; j < repeat; j++) {
printf("Case %d:\n", j + 1);
for (i = 0; i < 10; i++) {
dataset[j] = (int)((dataset[j] * dataset[j]) % 100000... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 140 | 2 |
#include <stdio.h>
int main(void) {
int n;
int rnd;
int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &rnd);
printf("case:%d\n", i + 1);
for (j = 0; j < 10; j++) {
rnd = ((rnd * rnd) / 100) % 10000;
printf("%d\n", rnd);
}
}
return (0);
} | #include <stdio.h>
int main(void) {
int n;
int rnd;
int i, j;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &rnd);
printf("Case %d:\n", i + 1);
for (j = 0; j < 10; j++) {
rnd = ((rnd * rnd) / 100) % 10000;
printf("%d\n", rnd);
}
}
return (0);
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 111 | 2 |
#include <algorithm>
#include <limits>
#include <stdio.h>
#include <utility>
using namespace std;
int main() {
const int N1 = 3, N2 = 8;
int i, j;
pair<double, int> a[N2], w1, w2;
w1.first = w2.first = numeric_limits<double>::max();
for (i = 0; i < N1; ++i) {
for (j = 0; j < N2; ++j) {
scanf("%d %lf... | #include <algorithm>
#include <limits>
#include <stdio.h>
#include <utility>
using namespace std;
int main() {
const int N1 = 3, N2 = 8;
int i, j;
pair<double, int> a[N2], w1, w2;
w1.first = w2.first = numeric_limits<double>::max();
for (i = 0; i < N1; ++i) {
for (j = 0; j < N2; ++j) {
scanf("%d %lf... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 254 | 1 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <stack>
#include <ut... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <stack>
#include <ut... | [["-", 39, 343, 141, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 343, 141, 344, 3, 347, 0, 77, 39, 40], ["-", 0, 77, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 77, 39, 344, 3, 347, 0, 77, 39, 40], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40]] | 1 | 409 | 8 |
r=[*$<];p r;a,b,c=r[0,8].sort_by{|t|t.split[1].to_f},r[8,8].sort_by{|t|t.split[1].to_f},r[16,8].sort_by{|t|t.split[1].to_f};puts a[0,2],b[0,2],c[0,2];*u=*a[2,6],*b[2,6],*c[2,6];
puts u.sort_by{|t|t.split[1].to_f}[0,2]
| r=[*$<];a,b,c=r[0,8].sort_by{|t|t.split[1].to_f},r[8,8].sort_by{|t|t.split[1].to_f},r[16,8].sort_by{|t|t.split[1].to_f};puts a[0,2],b[0,2],c[0,2];*u=*a[2,6],*b[2,6],*c[2,6];
puts u.sort_by{|t|t.split[1].to_f}[0,2]
| [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["-", 36, 36, 36, 36, 36, 36, 0, 493, 0, 35]] | 4 | 153 | 3 |
import sys
R = lambda:list(map(int,input().split()))
t2 = [[] for i in range(3)]
for i in range(3):
t = []
for j in range(8):
num,time = input().split()
t.append((float(time),int(num)))
t.sort()
for j in range(4):
t2[i].append(t[j])
t3 = []
for i in range(3):
t3.append(... | import sys
R = lambda:list(map(int,input().split()))
t2 = [[] for i in range(3)]
for i in range(3):
t = []
for j in range(8):
num,time = input().split()
t.append((float(time),int(num)))
t.sort()
for j in range(4):
t2[i].append(t[j])
t3 = []
for i in range(3):
t3.append(... | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 267 | 4 |
#include <stdio.h>
int main() {
int n, i, j;
char s[100001];
scanf("%d", &n);
while (n--) {
scanf("%s", s);
if (s[0] != '>') {
printf("NA");
continue;
}
if (s[1] == '\'') {
for (i = 2; s[i] == '='; i++)
; // printf("%c\n",s[i]);
for (j = 1; s[i - j] == '=' && s[i ... | #include <stdio.h>
int main() {
int n, i, j;
char s[100001];
scanf("%d", &n);
while (n--) {
scanf("%s", s);
if (s[0] != '>') {
printf("NA\n");
continue;
}
if (s[1] == '\'') {
for (i = 2; s[i] == '='; i++)
; // printf("%c\n",s[i]);
for (j = 1; s[i - j] == '=' && s[... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 303 | 1 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
#define rep(i, n) for ((i) = 0; (i) < (n); ++(i))
string solve(string s) {
int i = 0, j;
string tmp;
rep(i, 100) {
tmp += "=";
if (s == ">'" + tmp + "#" + tmp + "~~")
return "A";
}
tmp.clear();
rep(i, 100) {
... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
#define rep(i, n) for ((i) = 0; (i) < (n); ++(i))
string solve(string s) {
int i = 0, j;
string tmp;
rep(i, 100) {
tmp += "=";
if (s == ">'" + tmp + "#" + tmp + "~")
return "A";
}
tmp.clear();
rep(i, 100) {
t... | [["-", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6], ["+", 15, 339, 51, 16, 12, 16, 12, 5, 0, 6]] | 1 | 173 | 2 |
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int n;
string s;
int main() {
cin >> n;
while (cin >> s) {
... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int n;
string s;
int main() {
cin >> n;
while (cin >> s) {
... | [["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117]] | 1 | 405 | 2 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<double, int> P;
static... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<double, int> P;
static... | [["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["+", 75, 76, 0, 57, 75, 76, 0, 37, 0, 38], ["+", 75, 76, 0, 57, 75, 76, 0, 37, 0, 147], ["+", 75, 76, 0, 57, 75, 76, 0, 37, 0, 35]] | 1 | 484 | 4 |
gets.to_i.times do
s = gets.chomp
if s =~ /^>'(=+)#\1~$/
puts ?A
elsif s =~ /^>^(Q=)+(?:.*)~$/
puts ?B
else
puts 'NA'
end
end | gets.to_i.times do
s = gets.chomp
if s =~ /^>'(=+)#\1~$/
puts ?A
elsif s =~ /^>\^(Q=)+~~$/
puts ?B
else
puts 'NA'
end
end | [["-", 0, 121, 75, 759, 15, 738, 12, 575, 0, 6], ["+", 0, 121, 75, 759, 15, 738, 12, 575, 0, 6], ["+", 0, 121, 75, 759, 15, 738, 12, 575, 0, 44]] | 4 | 36 | 4 |
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
PrintWriter out = new PrintWriter(System.out);
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for (int i = 0; i < n; i++) {
byte s = Byte.parseByte(scan.next());
... | import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
PrintWriter out = new PrintWriter(System.out);
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for (int i = 0; i < n; i++) {
byte s = Byte.parseByte(scan.next());
... | [["-", 75, 196, 0, 57, 64, 1, 0, 492, 141, 22], ["+", 75, 196, 0, 57, 64, 1, 0, 492, 141, 22], ["-", 75, 196, 0, 57, 75, 1, 0, 492, 141, 22], ["+", 75, 196, 0, 57, 75, 1, 0, 492, 141, 22]] | 3 | 261 | 4 |
#include <math.h>
#include <stdio.h>
int main() {
int i, ban, n, s, kei;
scanf("%d", &n);
for (ban = 1; ban <= n; ban++) {
scanf("%d", &s);
printf("case %d:\n", ban);
for (i = 1; i <= 10; i++) {
s = s * s;
s = s / 100;
if (s > 10000) {
s = s % 10000;
}
printf("%d\... | #include <math.h>
#include <stdio.h>
int main() {
int i, ban, n, s, kei;
scanf("%d", &n);
for (ban = 1; ban <= n; ban++) {
scanf("%d", &s);
printf("Case %d:\n", ban);
for (i = 1; i <= 10; i++) {
s = s * s;
s = s / 100;
if (s > 10000) {
s = s % 10000;
}
printf("%d\... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 120 | 2 |
#include <stdio.h>
int main(void) {
int num, val, n, i;
scanf("%d", &num);
for (n = 0; n < num; n++) {
printf("Case %d:\n", num);
scanf("%d", &val);
for (i = 0; i < 10; i++) {
val = val * val % 100000000;
val = val / 100 % 10000;
printf("%d\n", val);
}
}
return 0;
} | #include <stdio.h>
int main(void) {
int num, val, n, i;
scanf("%d", &num);
for (n = 1; n <= num; ++n) {
printf("Case %d:\n", n);
scanf("%d", &val);
for (i = 0; i < 10; i++) {
val = val * val % 100000000;
val = val / 100 % 10000;
printf("%d\n", val);
}
}
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4,... | 0 | 107 | 8 |
#include <stdio.h>
int main(void) {
int n, i, j, random;
scanf("%d", &n);
for (i = 1; i < n; i++) {
scanf("%d", &random);
printf("Case %d:\n", i);
for (j = 0; j < 10; j++) {
random = random * random / 100 % 10000;
printf("%d\n", random);
}
}
return 0;
} | #include <stdio.h>
int main(void) {
int n, i, j, random;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
scanf("%d", &random);
printf("Case %d:\n", i);
for (j = 0; j < 10; j++) {
random = random * random / 100 % 10000;
printf("%d\n", random);
}
}
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 101 | 2 |
#include <stdio.h>
int main(void) {
int n, i, j;
int seed;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &seed);
printf("Case %d:\n", i);
for (j = 0; j < 10; j++) {
seed *= seed;
seed = (seed / 100) % 10000;
printf("%d\n", seed);
}
}
return (0);
} | #include <stdio.h>
int main(void) {
int n, i, j;
int seed;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &seed);
printf("Case %d:\n", i + 1);
for (j = 0; j < 10; j++) {
seed *= seed;
seed = (seed / 100) % 10000;
printf("%d\n", seed);
}
}
return (0);
} | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 108 | 2 |
#include <stdio.h>
int main() {
int N, x, c = 0, x1 = 0;
scanf("%d", &N);
for (int i = 0; i < N; i++) {
scanf("%d", &x);
int ii = i + 1;
printf("Case %d:", ii);
for (int j = 0; j < 10; j++) {
x = x * x;
x1 = x;
c = 1;
while ((x1 / 10) > 0) {
x1 = x1 / 10;
c... | #include <stdio.h>
int main() {
int N, x, c = 0, x1 = 0;
scanf("%d", &N);
for (int i = 0; i < N; i++) {
scanf("%d", &x);
int ii = i + 1;
printf("Case %d:\n", ii);
for (int j = 0; j < 10; j++) {
x = x * x;
x1 = x;
c = 1;
while ((x1 / 10) > 0) {
x1 = x1 / 10;
... | [["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 1 | 242 | 1 |
#include <iostream>
using namespace std;
int main() {
int q;
cin >> q;
for (int i = 0; i < q; i++) {
int b;
cin >> b;
cout << "Case " << i + 1 << endl;
for (int j = 0; j < 10; j++) {
int a[8] = {};
b *= b;
for (int k = 7; k >= 0; k--) {
a[k] = b % 10;
b /= 10;... | #include <iostream>
using namespace std;
int main() {
int q;
cin >> q;
for (int i = 0; i < q; i++) {
int b;
cin >> b;
cout << "Case " << i + 1 << ":" << endl;
for (int j = 0; j < 10; j++) {
int a[8] = {};
b *= b;
for (int k = 7; k >= 0; k--) {
a[k] = b % 10;
b... | [["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151]] | 1 | 159 | 4 |
#include <iostream>
using namespace std;
int jyo(int);
int main() {
int s, t, u;
cin >> s;
for (int i = 1; i <= s; i++) {
cin >> u;
cout << "Case" << i << ":" << endl;
for (int j = 0; j < 10; j++) {
t = jyo(u);
cout << t / 100 << endl;
u = t / 100;
}
}
return 0;
}
int jyo(... | #include <iostream>
using namespace std;
int jyo(int);
int main() {
int s, t, u;
cin >> s;
for (int i = 1; i <= s; i++) {
cin >> u;
cout << "Case " << i << ":" << endl;
for (int j = 0; j < 10; j++) {
t = jyo(u);
cout << t / 100 << endl;
u = t / 100;
}
}
return 0;
}
int jyo... | [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 138 | 2 |
#include <iostream>
#include <queue>
using namespace std;
int main() {
int n;
int s;
int x = 1;
queue<int> qu;
cin >> n;
while (n--) {
cout << "case" << x++ << ":" << endl;
cin >> s;
for (int i = 0; i < 10; i++) {
s = s * s;
int t = 10000000;
for (int cnt = 0; cnt < 8; cnt+... | #include <iostream>
#include <queue>
using namespace std;
int main() {
int n;
int s;
int x = 1;
queue<int> qu;
cin >> n;
while (n--) {
cout << "Case " << x++ << ":" << endl;
cin >> s;
for (int i = 0; i < 10; i++) {
s = s * s;
int t = 10000000;
for (int cnt = 0; cnt < 8; cnt... | [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 188 | 2 |
#include <bits/stdc++.h>
using namespace std;
void serch(int n, int now) {
n *= n;
int random = (n % 1000000 / 100);
cout << random << endl;
if (now < 10)
serch(random, now + 1);
}
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int num;
cin >> num;
cout << "Case" << i << ':' ... | #include <bits/stdc++.h>
using namespace std;
void serch(int n, int now) {
n *= n;
int random = (n % 1000000 / 100);
cout << random << endl;
if (now < 10)
serch(random, now + 1);
}
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
int num;
cin >> num;
cout << "Case " << i << ':'... | [["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 110 | 17 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <ss... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <ss... | [["+", 0, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 12, 13]] | 1 | 203 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
for (int z = 0; z < a; z++) {
long long n;
cin >> n;
cout << "Case " << z + 1 << endl;
for (int j = 0; j < 10; j++) {
n = n * n;
string a = to_string(n);
int b = a.length();
b = 8 - b;
string ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
for (int z = 0; z < a; z++) {
long long n;
cin >> n;
cout << "Case " << z + 1 << ":" << endl;
for (int j = 0; j < 10; j++) {
n = n * n;
string a = to_string(n);
int b = a.length();
b = 8 - b;
... | [["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151]] | 1 | 152 | 4 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#define vl vector<ll>
#def... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#define vl vector<ll>
#def... | [["+", 0, 16, 31, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 9, 0, 7, 15, 16, 12, 13]] | 1 | 268 | 6 |
// clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecis... | // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecis... | [["+", 0, 1, 0, 16, 31, 16, 12, 103, 0, 104], ["+", 0, 1, 0, 16, 31, 16, 12, 103, 0, 125], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151]] | 1 | 431 | 4 |
#include <iostream>
using namespace std;
int main() {
int d;
cin >> d;
for (int i = 1; i <= d; i++) {
int n;
cin >> n;
cout << "Case " << i << endl;
for (int j = 0; j < 10; j++) {
n *= n;
n /= 100;
n %= 10000;
cout << n << endl;
}
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int d;
cin >> d;
for (int i = 1; i <= d; i++) {
int n;
cin >> n;
cout << "Case " << i << ":" << endl;
for (int j = 0; j < 10; j++) {
n *= n;
n /= 100;
n %= 10000;
cout << n << endl;
}
}
return 0;
} | [["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151]] | 1 | 89 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.