node_ids
listlengths 4
1.4k
| edge_index
listlengths 1
2.22k
| text
listlengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
17,
13,
17,
30,
0,
13,
2,
2,
13,
17,
13,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
59,
5
],
[
59,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
29,
30
],
[
23,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
34,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
41,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
6,
56
],
[
56,
57
],
[
0,
58
],
[
58,
59
],
[
58,
60
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Integer price = sc.nextInt();\n sc.close();\n int change = 0;\n for (int i = 1; ; i++) {\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }\n System.out.println(change);\n } \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Integer price = sc.nextInt();\n sc.close();\n int change = 0;\n for (int i = 1; ; i++) {\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }\n System.out.println(change);\n } \n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Integer price = sc.nextInt();\n sc.close();\n int change = 0;\n for (int i = 1; ; i++) {\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }\n System.out.println(change);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n Integer price = sc.nextInt();\n sc.close();\n int change = 0;\n for (int i = 1; ; i++) {\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }\n System.out.println(change);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"Integer price = sc.nextInt();",
"price",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"int change = 0;",
"change",
"0",
"for (int i = 1; ; i++) {\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i++",
"i++",
"i",
"{\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }",
"{\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }",
"if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }",
"i * 1000 - price >= 0",
"i * 1000 - price",
"i * 1000",
"i",
"1000",
"price",
"0",
"{\n change = i * 1000 - price;\n break;\n }",
"change = i * 1000 - price",
"change",
"i * 1000 - price",
"i * 1000",
"i",
"1000",
"price",
"break;",
"System.out.println(change)",
"System.out.println",
"System.out",
"System",
"System.out",
"change",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Integer price = sc.nextInt();\n sc.close();\n int change = 0;\n for (int i = 1; ; i++) {\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }\n System.out.println(change);\n } \n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Integer price = sc.nextInt();\n sc.close();\n int change = 0;\n for (int i = 1; ; i++) {\n if (i * 1000 - price >= 0) {\n change = i * 1000 - price;\n break;\n }\n }\n System.out.println(change);\n } \n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Integer price = sc.nextInt();
sc.close();
int change = 0;
for (int i = 1; ; i++) {
if (i * 1000 - price >= 0) {
change = i * 1000 - price;
break;
}
}
System.out.println(change);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
42,
5
],
[
42,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
6,
39
],
[
39,
40
],
[
0,
41
],
[
41,
42
],
[
41,
43
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n if (N % 1000 == 0) System.out.println(0);\n else System.out.println(1000 - (N % 1000));\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n if (N % 1000 == 0) System.out.println(0);\n else System.out.println(1000 - (N % 1000));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n if (N % 1000 == 0) System.out.println(0);\n else System.out.println(1000 - (N % 1000));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n if (N % 1000 == 0) System.out.println(0);\n else System.out.println(1000 - (N % 1000));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (N % 1000 == 0) System.out.println(0);\n else System.out.println(1000 - (N % 1000));",
"N % 1000 == 0",
"N % 1000",
"N",
"1000",
"0",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.out.println(1000 - (N % 1000))",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - (N % 1000)",
"1000",
"(N % 1000)",
"N",
"1000",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n if (N % 1000 == 0) System.out.println(0);\n else System.out.println(1000 - (N % 1000));\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n if (N % 1000 == 0) System.out.println(0);\n else System.out.println(1000 - (N % 1000));\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
if (N % 1000 == 0) System.out.println(0);
else System.out.println(1000 - (N % 1000));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
17,
14,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
48,
5
],
[
48,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
29,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
6,
45
],
[
45,
46
],
[
0,
47
],
[
47,
48
],
[
47,
49
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int a = stdIn.nextInt();\n \n if(a % 1000 == 0)\n System.out.print(0);\n \n else if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int a = stdIn.nextInt();\n \n if(a % 1000 == 0)\n System.out.print(0);\n \n else if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int a = stdIn.nextInt();\n \n if(a % 1000 == 0)\n System.out.print(0);\n \n else if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);\n }",
"main",
"{\n Scanner stdIn = new Scanner(System.in);\n int a = stdIn.nextInt();\n \n if(a % 1000 == 0)\n System.out.print(0);\n \n else if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);\n }",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int a = stdIn.nextInt();",
"a",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"if(a % 1000 == 0)\n System.out.print(0);\n \n else if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);",
"a % 1000 == 0",
"a % 1000",
"a",
"1000",
"0",
"System.out.print(0)",
"System.out.print",
"System.out",
"System",
"System.out",
"0",
"if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);",
"a % 1000 != 0",
"a % 1000",
"a",
"1000",
"0",
"System.out.print(1000 - a % 1000)",
"System.out.print",
"System.out",
"System",
"System.out",
"1000 - a % 1000",
"1000",
"a % 1000",
"a",
"1000",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int a = stdIn.nextInt();\n \n if(a % 1000 == 0)\n System.out.print(0);\n \n else if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n int a = stdIn.nextInt();\n \n if(a % 1000 == 0)\n System.out.print(0);\n \n else if(a % 1000 != 0)\n System.out.print(1000 - a % 1000);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
int a = stdIn.nextInt();
if(a % 1000 == 0)
System.out.print(0);
else if(a % 1000 != 0)
System.out.print(1000 - a % 1000);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
4,
13,
41,
13,
2,
4,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
18,
13,
2,
17,
13,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
20,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
13,
29,
13,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
0,
13,
20,
12,
13,
30,
4,
13,
2,
13,
17,
4,
13,
2,
13,
17,
23,
13,
12,
13,
30,
4,
13,
4,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
7,
11
],
[
11,
12
],
[
7,
13
],
[
13,
14
],
[
7,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
17,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
17,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
17,
39
],
[
39,
40
],
[
40,
41
],
[
17,
42
],
[
42,
43
],
[
43,
44
],
[
15,
45
],
[
45,
46
],
[
7,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
47,
57
],
[
57,
58
],
[
7,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
67,
68
],
[
7,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
7,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
76,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
85,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
76,
104
],
[
104,
105
],
[
74,
106
],
[
106,
107
],
[
7,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
7,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
116,
122
],
[
122,
123
],
[
7,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
7,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
7,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
138,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
136,
149
],
[
149,
150
],
[
7,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
156,
157
]
]
| [
"import java.util.*;\nimport java.io.*;\n\nclass Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tsetIO();\n\n\t\tint N = ni() % 1000;\n\t\tif (N == 0) N = 1000;\n\t\tout.println(1000 - N);\n\t\t\n\t\tf.close();\n\t\tout.close();\n\t}\n\n\tstatic BufferedReader f;\n\tstatic PrintWriter out;\n\tstatic StringTokenizer st;\n\n\tstatic int ni(StringTokenizer st) {\n\t\treturn Integer.parseInt(st.nextToken());\n\t}\n\n\tstatic int ni() throws IOException {\n\t\treturn Integer.parseInt(f.readLine());\n\t}\n\n\tstatic StringTokenizer nl() throws IOException {\n\t\treturn new StringTokenizer(f.readLine());\n\t}\n\n\tstatic int[] nia(int N) throws IOException {\n\t\tStringTokenizer st = nl();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tA[i] = ni(st);\n\t\treturn A;\n\t}\n\n\tstatic void setIn(String s) throws IOException {\n\t\tf = new BufferedReader(new FileReader(s));\n\t}\n\n\tstatic void setOut(String s) throws IOException {\n\t\tout = new PrintWriter(new FileWriter(s));\n\t}\n\n\tstatic void setIn() {\n\t\tf = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\n\tstatic void setOut() {\n\t\tout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t}\n\n\tstatic void setIO(String s) throws IOException {\n\t\tsetIn(s + \".in\");\n\t\tsetOut(s + \".out\");\n\t}\n\n\tstatic void setIO() {\n\t\tsetIn();\n\t\tsetOut();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tsetIO();\n\n\t\tint N = ni() % 1000;\n\t\tif (N == 0) N = 1000;\n\t\tout.println(1000 - N);\n\t\t\n\t\tf.close();\n\t\tout.close();\n\t}\n\n\tstatic BufferedReader f;\n\tstatic PrintWriter out;\n\tstatic StringTokenizer st;\n\n\tstatic int ni(StringTokenizer st) {\n\t\treturn Integer.parseInt(st.nextToken());\n\t}\n\n\tstatic int ni() throws IOException {\n\t\treturn Integer.parseInt(f.readLine());\n\t}\n\n\tstatic StringTokenizer nl() throws IOException {\n\t\treturn new StringTokenizer(f.readLine());\n\t}\n\n\tstatic int[] nia(int N) throws IOException {\n\t\tStringTokenizer st = nl();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tA[i] = ni(st);\n\t\treturn A;\n\t}\n\n\tstatic void setIn(String s) throws IOException {\n\t\tf = new BufferedReader(new FileReader(s));\n\t}\n\n\tstatic void setOut(String s) throws IOException {\n\t\tout = new PrintWriter(new FileWriter(s));\n\t}\n\n\tstatic void setIn() {\n\t\tf = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\n\tstatic void setOut() {\n\t\tout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t}\n\n\tstatic void setIO(String s) throws IOException {\n\t\tsetIn(s + \".in\");\n\t\tsetOut(s + \".out\");\n\t}\n\n\tstatic void setIO() {\n\t\tsetIn();\n\t\tsetOut();\n\t}\n}",
"Main",
"static BufferedReader f;",
"f",
"static PrintWriter out;",
"out",
"static StringTokenizer st;",
"st",
"public static void main(String[] args) throws IOException {\n\t\tsetIO();\n\n\t\tint N = ni() % 1000;\n\t\tif (N == 0) N = 1000;\n\t\tout.println(1000 - N);\n\t\t\n\t\tf.close();\n\t\tout.close();\n\t}",
"main",
"{\n\t\tsetIO();\n\n\t\tint N = ni() % 1000;\n\t\tif (N == 0) N = 1000;\n\t\tout.println(1000 - N);\n\t\t\n\t\tf.close();\n\t\tout.close();\n\t}",
"setIO()",
"setIO",
"int N = ni() % 1000;",
"N",
"ni() % 1000",
"ni()",
"ni",
"1000",
"if (N == 0) N = 1000;",
"N == 0",
"N",
"0",
"N = 1000",
"N",
"1000",
"out.println(1000 - N)",
"out.println",
"out",
"1000 - N",
"1000",
"N",
"f.close()",
"f.close",
"f",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static int ni(StringTokenizer st) {\n\t\treturn Integer.parseInt(st.nextToken());\n\t}",
"ni",
"{\n\t\treturn Integer.parseInt(st.nextToken());\n\t}",
"return Integer.parseInt(st.nextToken());",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"StringTokenizer st",
"st",
"static int ni() throws IOException {\n\t\treturn Integer.parseInt(f.readLine());\n\t}",
"ni",
"{\n\t\treturn Integer.parseInt(f.readLine());\n\t}",
"return Integer.parseInt(f.readLine());",
"Integer.parseInt(f.readLine())",
"Integer.parseInt",
"Integer",
"f.readLine()",
"f.readLine",
"f",
"static StringTokenizer nl() throws IOException {\n\t\treturn new StringTokenizer(f.readLine());\n\t}",
"nl",
"{\n\t\treturn new StringTokenizer(f.readLine());\n\t}",
"return new StringTokenizer(f.readLine());",
"new StringTokenizer(f.readLine())",
"static int[] nia(int N) throws IOException {\n\t\tStringTokenizer st = nl();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tA[i] = ni(st);\n\t\treturn A;\n\t}",
"nia",
"{\n\t\tStringTokenizer st = nl();\n\t\tint[] A = new int[N];\n\t\tfor (int i = 0; i < N; i++)\n\t\t\tA[i] = ni(st);\n\t\treturn A;\n\t}",
"StringTokenizer st = nl();",
"st",
"nl()",
"nl",
"int[] A = new int[N];",
"A",
"new int[N]",
"N",
"for (int i = 0; i < N; i++)\n\t\t\tA[i] = ni(st);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"A[i] = ni(st);",
"A[i] = ni(st)",
"A[i]",
"A",
"i",
"ni(st)",
"ni",
"st",
"return A;",
"A",
"int N",
"N",
"static void setIn(String s) throws IOException {\n\t\tf = new BufferedReader(new FileReader(s));\n\t}",
"setIn",
"{\n\t\tf = new BufferedReader(new FileReader(s));\n\t}",
"f = new BufferedReader(new FileReader(s))",
"f",
"new BufferedReader(new FileReader(s))",
"String s",
"s",
"static void setOut(String s) throws IOException {\n\t\tout = new PrintWriter(new FileWriter(s));\n\t}",
"setOut",
"{\n\t\tout = new PrintWriter(new FileWriter(s));\n\t}",
"out = new PrintWriter(new FileWriter(s))",
"out",
"new PrintWriter(new FileWriter(s))",
"String s",
"s",
"static void setIn() {\n\t\tf = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"setIn",
"{\n\t\tf = new BufferedReader(new InputStreamReader(System.in));\n\t}",
"f = new BufferedReader(new InputStreamReader(System.in))",
"f",
"new BufferedReader(new InputStreamReader(System.in))",
"static void setOut() {\n\t\tout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t}",
"setOut",
"{\n\t\tout = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t}",
"out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))",
"out",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))",
"static void setIO(String s) throws IOException {\n\t\tsetIn(s + \".in\");\n\t\tsetOut(s + \".out\");\n\t}",
"setIO",
"{\n\t\tsetIn(s + \".in\");\n\t\tsetOut(s + \".out\");\n\t}",
"setIn(s + \".in\")",
"setIn",
"s + \".in\"",
"s",
"\".in\"",
"setOut(s + \".out\")",
"setOut",
"s + \".out\"",
"s",
"\".out\"",
"String s",
"s",
"static void setIO() {\n\t\tsetIn();\n\t\tsetOut();\n\t}",
"setIO",
"{\n\t\tsetIn();\n\t\tsetOut();\n\t}",
"setIn()",
"setIn",
"setOut()",
"setOut"
]
| import java.util.*;
import java.io.*;
class Main {
public static void main(String[] args) throws IOException {
setIO();
int N = ni() % 1000;
if (N == 0) N = 1000;
out.println(1000 - N);
f.close();
out.close();
}
static BufferedReader f;
static PrintWriter out;
static StringTokenizer st;
static int ni(StringTokenizer st) {
return Integer.parseInt(st.nextToken());
}
static int ni() throws IOException {
return Integer.parseInt(f.readLine());
}
static StringTokenizer nl() throws IOException {
return new StringTokenizer(f.readLine());
}
static int[] nia(int N) throws IOException {
StringTokenizer st = nl();
int[] A = new int[N];
for (int i = 0; i < N; i++)
A[i] = ni(st);
return A;
}
static void setIn(String s) throws IOException {
f = new BufferedReader(new FileReader(s));
}
static void setOut(String s) throws IOException {
out = new PrintWriter(new FileWriter(s));
}
static void setIn() {
f = new BufferedReader(new InputStreamReader(System.in));
}
static void setOut() {
out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
}
static void setIO(String s) throws IOException {
setIn(s + ".in");
setOut(s + ".out");
}
static void setIO() {
setIn();
setOut();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
2,
4,
18,
13,
17,
4,
18,
18,
13,
13,
8,
2,
13,
17,
13,
2,
17,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
14,
18
],
[
8,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
19,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
6,
32
],
[
32,
33
]
]
| [
"import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt() % 1000;\n System.out.println(a == 0 ? a : 1000 - a);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt() % 1000;\n System.out.println(a == 0 ? a : 1000 - a);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt() % 1000;\n System.out.println(a == 0 ? a : 1000 - a);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt() % 1000;\n System.out.println(a == 0 ? a : 1000 - a);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt() % 1000;",
"a",
"sc.nextInt() % 1000",
"sc.nextInt()",
"sc.nextInt",
"sc",
"1000",
"System.out.println(a == 0 ? a : 1000 - a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a == 0 ? a : 1000 - a",
"a == 0",
"a",
"0",
"a",
"1000 - a",
"1000",
"a",
"String[] args",
"args"
]
| import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt() % 1000;
System.out.println(a == 0 ? a : 1000 - a);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
44,
5
],
[
44,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
6,
41
],
[
41,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int ans = 1000 - (x % 1000);\n if (ans == 1000) {\n ans = 0;\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int ans = 1000 - (x % 1000);\n if (ans == 1000) {\n ans = 0;\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int ans = 1000 - (x % 1000);\n if (ans == 1000) {\n ans = 0;\n }\n System.out.println(ans);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int ans = 1000 - (x % 1000);\n if (ans == 1000) {\n ans = 0;\n }\n System.out.println(ans);\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 1000 - (x % 1000);",
"ans",
"1000 - (x % 1000)",
"1000",
"(x % 1000)",
"x",
"1000",
"if (ans == 1000) {\n ans = 0;\n }",
"ans == 1000",
"ans",
"1000",
"{\n ans = 0;\n }",
"ans = 0",
"ans",
"0",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int ans = 1000 - (x % 1000);\n if (ans == 1000) {\n ans = 0;\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int ans = 1000 - (x % 1000);\n if (ans == 1000) {\n ans = 0;\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int ans = 1000 - (x % 1000);
if (ans == 1000) {
ans = 0;
}
System.out.println(ans);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
14,
2,
2,
13,
17,
17,
0,
13,
17,
0,
13,
4,
18,
13,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
51,
5
],
[
51,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
23,
29
],
[
29,
30
],
[
29,
31
],
[
23,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
6,
48
],
[
48,
49
],
[
0,
50
],
[
50,
51
],
[
50,
52
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\tint res = 0;\n\t\tif(n % 1000 == 0)\n\t\t\tres = 0;\n\t\telse\n\t\t\tres = Math.abs(n % 1000 - 1000);\n\t\tSystem.out.println(res);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\tint res = 0;\n\t\tif(n % 1000 == 0)\n\t\t\tres = 0;\n\t\telse\n\t\t\tres = Math.abs(n % 1000 - 1000);\n\t\tSystem.out.println(res);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\tint res = 0;\n\t\tif(n % 1000 == 0)\n\t\t\tres = 0;\n\t\telse\n\t\t\tres = Math.abs(n % 1000 - 1000);\n\t\tSystem.out.println(res);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\tint res = 0;\n\t\tif(n % 1000 == 0)\n\t\t\tres = 0;\n\t\telse\n\t\t\tres = Math.abs(n % 1000 - 1000);\n\t\tSystem.out.println(res);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"int res = 0;",
"res",
"0",
"if(n % 1000 == 0)\n\t\t\tres = 0;\n\t\telse\n\t\t\tres = Math.abs(n % 1000 - 1000);",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"res = 0",
"res",
"0",
"res = Math.abs(n % 1000 - 1000)",
"res",
"Math.abs(n % 1000 - 1000)",
"Math.abs",
"Math",
"n % 1000 - 1000",
"n % 1000",
"n",
"1000",
"1000",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\tint res = 0;\n\t\tif(n % 1000 == 0)\n\t\t\tres = 0;\n\t\telse\n\t\t\tres = Math.abs(n % 1000 - 1000);\n\t\tSystem.out.println(res);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\tint res = 0;\n\t\tif(n % 1000 == 0)\n\t\t\tres = 0;\n\t\telse\n\t\t\tres = Math.abs(n % 1000 - 1000);\n\t\tSystem.out.println(res);\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
int res = 0;
if(n % 1000 == 0)
res = 0;
else
res = Math.abs(n % 1000 - 1000);
System.out.println(res);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
4,
18,
18,
13,
13,
2,
2,
13,
13,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
6,
11
],
[
11,
12
],
[
66,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
16,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
39,
40
],
[
39,
41
],
[
28,
42
],
[
42,
43
],
[
42,
44
],
[
28,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
66,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
55,
63
],
[
63,
64
],
[
0,
65
],
[
65,
66
],
[
65,
67
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n abc173_a();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n // public static void abc000_a() {\n // try (Scanner sc = new Scanner(System.in)) {\n //\n // System.out.println(\"テスト\");\n // } catch (Exception e) {\n // System.out.println(\"エラー\" + e);\n // }\n // }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n abc173_a();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n // public static void abc000_a() {\n // try (Scanner sc = new Scanner(System.in)) {\n //\n // System.out.println(\"テスト\");\n // } catch (Exception e) {\n // System.out.println(\"エラー\" + e);\n // }\n // }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n}",
"Main",
"public static void main(String[] args) {\n abc173_a();\n }",
"main",
"{\n abc173_a();\n }",
"abc173_a()",
"abc173_a",
"String[] args",
"args",
"public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"abc173_a",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }",
"Exception e",
"{\n System.out.println(\"エラー\" + e);\n }",
"System.out.println(\"エラー\" + e)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"エラー\" + e",
"\"エラー\"",
"e",
"{\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int payment = parseI(sc.next());",
"payment",
"parseI(sc.next())",
"parseI",
"sc.next()",
"sc.next",
"sc",
"int max = 10000;",
"max",
"10000",
"int thou = 1000;",
"thou",
"1000",
"System.out.println((max - payment) % thou)",
"System.out.println",
"System.out",
"System",
"System.out",
"(max - payment) % thou",
"(max - payment)",
"max",
"payment",
"thou",
"public static int parseI(String value) {\n return Integer.parseInt(value);\n }",
"parseI",
"{\n return Integer.parseInt(value);\n }",
"return Integer.parseInt(value);",
"Integer.parseInt(value)",
"Integer.parseInt",
"Integer",
"value",
"String value",
"value",
"public class Main {\n\n public static void main(String[] args) {\n abc173_a();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n // public static void abc000_a() {\n // try (Scanner sc = new Scanner(System.in)) {\n //\n // System.out.println(\"テスト\");\n // } catch (Exception e) {\n // System.out.println(\"エラー\" + e);\n // }\n // }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n abc173_a();\n }\n\n // int 2147483648 [ 2 * 10(9)]\n // long 9223372036854775808 [ 9 * 10(18)]\n\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int payment = parseI(sc.next());\n int max = 10000;\n int thou = 1000;\n\n System.out.println((max - payment) % thou);\n } catch (Exception e) {\n System.out.println(\"エラー\" + e);\n }\n }\n\n // public static void abc000_a() {\n // try (Scanner sc = new Scanner(System.in)) {\n //\n // System.out.println(\"テスト\");\n // } catch (Exception e) {\n // System.out.println(\"エラー\" + e);\n // }\n // }\n\n public static int parseI(String value) {\n return Integer.parseInt(value);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
abc173_a();
}
// int 2147483648 [ 2 * 10(9)]
// long 9223372036854775808 [ 9 * 10(18)]
public static void abc173_a() {
try (Scanner sc = new Scanner(System.in)) {
int payment = parseI(sc.next());
int max = 10000;
int thou = 1000;
System.out.println((max - payment) % thou);
} catch (Exception e) {
System.out.println("エラー" + e);
}
}
// public static void abc000_a() {
// try (Scanner sc = new Scanner(System.in)) {
//
// System.out.println("テスト");
// } catch (Exception e) {
// System.out.println("エラー" + e);
// }
// }
public static int parseI(String value) {
return Integer.parseInt(value);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
2,
13,
17,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
65,
35
],
[
65,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
38,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
49,
55
],
[
38,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
36,
62
],
[
62,
63
],
[
0,
64
],
[
64,
65
],
[
64,
66
]
]
| [
"//package project1;\nimport java.io.*;\nimport java.math.*;\nimport java.security.*;\nimport java.text.*;\nimport java.util.*;\nimport java.util.concurrent.*;\nimport java.util.function.*;\nimport java.util.regex.*;\nimport java.util.stream.*;\nimport static java.util.stream.Collectors.joining;\nimport static java.util.stream.Collectors.toList;\n\npublic class Main {\n public static void main(String args[]) {\n \t Scanner sc = new Scanner(System.in);\n \t\t\t int n = sc.nextInt();\n \t int res = (1000-(n%1000))%1000;\n \t System.out.println(res);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.security.*;",
"security.*",
"java",
"import java.text.*;",
"text.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.util.concurrent.*;",
"concurrent.*",
"java.util",
"import java.util.function.*;",
"function.*",
"java.util",
"import java.util.regex.*;",
"regex.*",
"java.util",
"import java.util.stream.*;",
"stream.*",
"java.util",
"import static java.util.stream.Collectors.joining;",
"import static java.util.stream.Collectors.joining;",
"import static java.util.stream.Collectors.joining;",
"import static java.util.stream.Collectors.toList;",
"import static java.util.stream.Collectors.toList;",
"import static java.util.stream.Collectors.toList;",
"public class Main {\n public static void main(String args[]) {\n \t Scanner sc = new Scanner(System.in);\n \t\t\t int n = sc.nextInt();\n \t int res = (1000-(n%1000))%1000;\n \t System.out.println(res);\n }\n}",
"Main",
"public static void main(String args[]) {\n \t Scanner sc = new Scanner(System.in);\n \t\t\t int n = sc.nextInt();\n \t int res = (1000-(n%1000))%1000;\n \t System.out.println(res);\n }",
"main",
"{\n \t Scanner sc = new Scanner(System.in);\n \t\t\t int n = sc.nextInt();\n \t int res = (1000-(n%1000))%1000;\n \t System.out.println(res);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int res = (1000-(n%1000))%1000;",
"res",
"(1000-(n%1000))%1000",
"(1000-(n%1000))",
"1000",
"(n%1000)",
"n",
"1000",
"1000",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String args[]",
"args",
"public class Main {\n public static void main(String args[]) {\n \t Scanner sc = new Scanner(System.in);\n \t\t\t int n = sc.nextInt();\n \t int res = (1000-(n%1000))%1000;\n \t System.out.println(res);\n }\n}",
"public class Main {\n public static void main(String args[]) {\n \t Scanner sc = new Scanner(System.in);\n \t\t\t int n = sc.nextInt();\n \t int res = (1000-(n%1000))%1000;\n \t System.out.println(res);\n }\n}",
"Main"
]
| //package project1;
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int res = (1000-(n%1000))%1000;
System.out.println(res);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
4,
18,
13,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
51,
5
],
[
51,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
22,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
28,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
6,
48
],
[
48,
49
],
[
0,
50
],
[
50,
51
],
[
50,
52
]
]
| [
" import java.util.Scanner;\n \n public class Main {\n \n \tpublic static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String price = scan.nextLine();\n scan.close();\n \n int otsuri = Integer.parseInt(price) % 1000;\n if (otsuri == 0) {\n System.out.println(otsuri);\n } else {\n System.out.println(1000 - otsuri);\n }\n }\n }",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n \tpublic static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String price = scan.nextLine();\n scan.close();\n \n int otsuri = Integer.parseInt(price) % 1000;\n if (otsuri == 0) {\n System.out.println(otsuri);\n } else {\n System.out.println(1000 - otsuri);\n }\n }\n }",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String price = scan.nextLine();\n scan.close();\n \n int otsuri = Integer.parseInt(price) % 1000;\n if (otsuri == 0) {\n System.out.println(otsuri);\n } else {\n System.out.println(1000 - otsuri);\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n String price = scan.nextLine();\n scan.close();\n \n int otsuri = Integer.parseInt(price) % 1000;\n if (otsuri == 0) {\n System.out.println(otsuri);\n } else {\n System.out.println(1000 - otsuri);\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String price = scan.nextLine();",
"price",
"scan.nextLine()",
"scan.nextLine",
"scan",
"scan.close()",
"scan.close",
"scan",
"int otsuri = Integer.parseInt(price) % 1000;",
"otsuri",
"Integer.parseInt(price) % 1000",
"Integer.parseInt(price)",
"Integer.parseInt",
"Integer",
"price",
"1000",
"if (otsuri == 0) {\n System.out.println(otsuri);\n } else {\n System.out.println(1000 - otsuri);\n }",
"otsuri == 0",
"otsuri",
"0",
"{\n System.out.println(otsuri);\n }",
"System.out.println(otsuri)",
"System.out.println",
"System.out",
"System",
"System.out",
"otsuri",
"{\n System.out.println(1000 - otsuri);\n }",
"System.out.println(1000 - otsuri)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - otsuri",
"1000",
"otsuri",
"String[] args",
"args",
"public class Main {\n \n \tpublic static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String price = scan.nextLine();\n scan.close();\n \n int otsuri = Integer.parseInt(price) % 1000;\n if (otsuri == 0) {\n System.out.println(otsuri);\n } else {\n System.out.println(1000 - otsuri);\n }\n }\n }",
"public class Main {\n \n \tpublic static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String price = scan.nextLine();\n scan.close();\n \n int otsuri = Integer.parseInt(price) % 1000;\n if (otsuri == 0) {\n System.out.println(otsuri);\n } else {\n System.out.println(1000 - otsuri);\n }\n }\n }",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String price = scan.nextLine();
scan.close();
int otsuri = Integer.parseInt(price) % 1000;
if (otsuri == 0) {
System.out.println(otsuri);
} else {
System.out.println(1000 - otsuri);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
0,
13,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
63,
5
],
[
63,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
26,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
39,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
39,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
6,
60
],
[
60,
61
],
[
0,
62
],
[
62,
63
],
[
62,
64
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n \n \tint maisu = 0;\n \tint otsuri = 0;\n \tif(n%1000==0) {\n System.out.println(0);\n } else {\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n \n \tint maisu = 0;\n \tint otsuri = 0;\n \tif(n%1000==0) {\n System.out.println(0);\n } else {\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n \n \tint maisu = 0;\n \tint otsuri = 0;\n \tif(n%1000==0) {\n System.out.println(0);\n } else {\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }\n }",
"main",
"{\n\t Scanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n \n \tint maisu = 0;\n \tint otsuri = 0;\n \tif(n%1000==0) {\n System.out.println(0);\n } else {\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"int maisu = 0;",
"maisu",
"0",
"int otsuri = 0;",
"otsuri",
"0",
"if(n%1000==0) {\n System.out.println(0);\n } else {\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }",
"n%1000==0",
"n%1000",
"n",
"1000",
"0",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }",
"maisu = n / 1000 + 1",
"maisu",
"n / 1000 + 1",
"n / 1000",
"n",
"1000",
"1",
"otsuri = maisu * 1000 - n",
"otsuri",
"maisu * 1000 - n",
"maisu * 1000",
"maisu",
"1000",
"n",
"System.out.println(otsuri)",
"System.out.println",
"System.out",
"System",
"System.out",
"otsuri",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n \n \tint maisu = 0;\n \tint otsuri = 0;\n \tif(n%1000==0) {\n System.out.println(0);\n } else {\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }\n }\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t Scanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tsc.close();\n \n \tint maisu = 0;\n \tint otsuri = 0;\n \tif(n%1000==0) {\n System.out.println(0);\n } else {\n maisu = n / 1000 + 1;\n otsuri = maisu * 1000 - n;\n System.out.println(otsuri);\n }\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.close();
int maisu = 0;
int otsuri = 0;
if(n%1000==0) {
System.out.println(0);
} else {
maisu = n / 1000 + 1;
otsuri = maisu * 1000 - n;
System.out.println(otsuri);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
40,
13,
17,
30,
4,
18,
13,
2,
2,
17,
2,
4,
18,
13,
17,
17,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
30,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
4,
18,
13,
13,
29,
4,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
327,
35
],
[
327,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
38,
49
],
[
49,
50
],
[
49,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
38,
55
],
[
55,
56
],
[
55,
57
],
[
38,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
58,
63
],
[
38,
64
],
[
64,
65
],
[
65,
66
],
[
36,
67
],
[
67,
68
],
[
327,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
89,
93
],
[
86,
94
],
[
71,
95
],
[
95,
96
],
[
71,
97
],
[
97,
98
],
[
71,
99
],
[
99,
100
],
[
327,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
101,
109
],
[
109,
110
],
[
101,
111
],
[
111,
112
],
[
101,
113
],
[
113,
114
],
[
101,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
115,
123
],
[
123,
124
],
[
101,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
128,
133
],
[
133,
134
],
[
134,
135
],
[
127,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
144,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
140,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
127,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
101,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
172,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
172,
186
],
[
186,
187
],
[
186,
188
],
[
172,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
193,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
172,
202
],
[
202,
203
],
[
202,
204
],
[
172,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
205,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
212,
216
],
[
216,
217
],
[
216,
218
],
[
211,
219
],
[
219,
220
],
[
220,
221
],
[
210,
222
],
[
222,
223
],
[
222,
224
],
[
210,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
227,
229
],
[
210,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
172,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
101,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
241,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
247,
250
],
[
240,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
238,
255
],
[
255,
256
],
[
101,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
260,
261
],
[
264,
262
],
[
274,
263
],
[
271,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
264,
268
],
[
268,
269
],
[
268,
270
],
[
271,
271
],
[
271,
272
],
[
271,
273
],
[
274,
274
],
[
274,
275
],
[
274,
276
],
[
264,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
257,
281
],
[
281,
282
],
[
101,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
327,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
289,
293
],
[
293,
294
],
[
293,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
293,
299
],
[
299,
300
],
[
289,
301
],
[
301,
302
],
[
301,
303
],
[
303,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
304,
308
],
[
301,
309
],
[
309,
310
],
[
289,
311
],
[
311,
312
],
[
311,
313
],
[
313,
314
],
[
314,
315
],
[
315,
316
],
[
289,
317
],
[
317,
318
],
[
317,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
320,
323
],
[
317,
324
],
[
324,
325
],
[
0,
326
],
[
326,
327
],
[
326,
328
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.io.BufferedWriter;\nimport java.io.Writer;\nimport java.io.OutputStreamWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n APayment solver = new APayment();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class APayment {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.io.BufferedWriter;",
"BufferedWriter",
"java.io",
"import java.io.Writer;",
"Writer",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n APayment solver = new APayment();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class APayment {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n APayment solver = new APayment();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n APayment solver = new APayment();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"OutputWriter out = new OutputWriter(outputStream);",
"out",
"new OutputWriter(outputStream)",
"APayment solver = new APayment();",
"solver",
"new APayment()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class APayment {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }\n }\n\n }",
"APayment",
"public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }\n }",
"solve",
"{\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }\n }",
"int ntc = 1;",
"ntc",
"1",
"while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }",
"(ntc--) > 0",
"(ntc--)",
"ntc",
"0",
"{\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }",
"out.println((1000 - (in.nextInt() % 1000)) % 1000)",
"out.println",
"out",
"(1000 - (in.nextInt() % 1000)) % 1000",
"(1000 - (in.nextInt() % 1000))",
"1000",
"(in.nextInt() % 1000)",
"in.nextInt()",
"in.nextInt",
"in",
"1000",
"1000",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"OutputWriter out",
"out",
"static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private InputReader.SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"read",
"{\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"if (numChars == -1) {\n throw new InputMismatchException();\n }",
"numChars == -1",
"numChars",
"-1",
"1",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0) {\n return -1;\n }",
"numChars <= 0",
"numChars",
"0",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = read();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = read();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }",
"if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"isSpaceChar",
"{\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"if (filter != null) {\n return filter.isSpaceChar(c);\n }",
"filter != null",
"filter",
"null",
"{\n return filter.isSpaceChar(c);\n }",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return isWhitespace(c);",
"isWhitespace(c)",
"isWhitespace",
"c",
"int c",
"c",
"public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isWhitespace",
"{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"OutputWriter",
"{\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }",
"OutputWriter",
"{\n this.writer = new PrintWriter(writer);\n }",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void close() {\n writer.close();\n }",
"close",
"{\n writer.close();\n }",
"writer.close()",
"writer.close",
"writer",
"public void println(long i) {\n writer.println(i);\n }",
"println",
"{\n writer.println(i);\n }",
"writer.println(i)",
"writer.println",
"writer",
"i",
"long i",
"i",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n APayment solver = new APayment();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class APayment {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n APayment solver = new APayment();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class APayment {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n out.println((1000 - (in.nextInt() % 1000)) % 1000);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
OutputWriter out = new OutputWriter(outputStream);
APayment solver = new APayment();
solver.solve(1, in, out);
out.close();
}
static class APayment {
public void solve(int testNumber, InputReader in, OutputWriter out) {
int ntc = 1;
// ntc = in.nextInt();
while ((ntc--) > 0) {
out.println((1000 - (in.nextInt() % 1000)) % 1000);
}
}
}
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private InputReader.SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (numChars == -1) {
throw new InputMismatchException();
}
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0) {
return -1;
}
}
return buf[curChar++];
}
public int nextInt() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public boolean isSpaceChar(int c) {
if (filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
public static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
static class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void close() {
writer.close();
}
public void println(long i) {
writer.println(i);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
0,
13,
4,
18,
13,
41,
13,
2,
2,
2,
13,
17,
17,
17,
41,
13,
2,
2,
13,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
21,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
6,
41
],
[
41,
42
]
]
| [
"import java.util.Scanner;\n\nclass Main{\n static public void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n;\n n = sc.nextInt();\n\n int x = (n+1000-1)/1000;\n int change = x*1000 - n;\n\n System.out.println(change);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n static public void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n;\n n = sc.nextInt();\n\n int x = (n+1000-1)/1000;\n int change = x*1000 - n;\n\n System.out.println(change);\n }\n}",
"Main",
"static public void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int n;\n n = sc.nextInt();\n\n int x = (n+1000-1)/1000;\n int change = x*1000 - n;\n\n System.out.println(change);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int n;\n n = sc.nextInt();\n\n int x = (n+1000-1)/1000;\n int change = x*1000 - n;\n\n System.out.println(change);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n;",
"n",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int x = (n+1000-1)/1000;",
"x",
"(n+1000-1)/1000",
"(n+1000-1)",
"n+1000",
"n",
"1000",
"1",
"1000",
"int change = x*1000 - n;",
"change",
"x*1000 - n",
"x*1000",
"x",
"1000",
"n",
"System.out.println(change)",
"System.out.println",
"System.out",
"System",
"System.out",
"change",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main{
static public void main(String[] args){
Scanner sc = new Scanner(System.in);
int n;
n = sc.nextInt();
int x = (n+1000-1)/1000;
int change = x*1000 - n;
System.out.println(change);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
17,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
30,
41,
13,
2,
13,
17,
41,
13,
17,
14,
2,
17,
13,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
58,
5
],
[
58,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
17,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
30,
36
],
[
36,
37
],
[
36,
38
],
[
30,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
30,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
6,
55
],
[
55,
56
],
[
0,
57
],
[
57,
58
],
[
57,
59
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int price = sc.nextInt();\n \n if(1000 >= price) {\n System.out.println(1000 - price);\n } else {\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int price = sc.nextInt();\n \n if(1000 >= price) {\n System.out.println(1000 - price);\n } else {\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int price = sc.nextInt();\n \n if(1000 >= price) {\n System.out.println(1000 - price);\n } else {\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int price = sc.nextInt();\n \n if(1000 >= price) {\n System.out.println(1000 - price);\n } else {\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int price = sc.nextInt();",
"price",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(1000 >= price) {\n System.out.println(1000 - price);\n } else {\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }",
"1000 >= price",
"1000",
"price",
"{\n System.out.println(1000 - price);\n }",
"System.out.println(1000 - price)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - price",
"1000",
"price",
"{\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }",
"int surplus = price % 1000;",
"surplus",
"price % 1000",
"price",
"1000",
"int change = 0;",
"change",
"0",
"if(0 != surplus) {\n change = 1000 - surplus;\n }",
"0 != surplus",
"0",
"surplus",
"{\n change = 1000 - surplus;\n }",
"change = 1000 - surplus",
"change",
"1000 - surplus",
"1000",
"surplus",
"System.out.println(change)",
"System.out.println",
"System.out",
"System",
"System.out",
"change",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int price = sc.nextInt();\n \n if(1000 >= price) {\n System.out.println(1000 - price);\n } else {\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }\n }\n}",
"public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int price = sc.nextInt();\n \n if(1000 >= price) {\n System.out.println(1000 - price);\n } else {\n int surplus = price % 1000;\n int change = 0;\n if(0 != surplus) {\n change = 1000 - surplus;\n }\n System.out.println(change);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int price = sc.nextInt();
if(1000 >= price) {
System.out.println(1000 - price);
} else {
int surplus = price % 1000;
int change = 0;
if(0 != surplus) {
change = 1000 - surplus;
}
System.out.println(change);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
2,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
0,
13,
2,
2,
2,
13,
13,
17,
17,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
54,
5
],
[
54,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
20,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
36,
42
],
[
33,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
6,
51
],
[
51,
52
],
[
0,
53
],
[
53,
54
],
[
53,
55
]
]
| [
"import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n //N円の商品を1000円札のみで買い、お釣りを表示\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int money = 1000;\n \n \n \n if (N % money == 0) {//お釣りなし\n System.out.println(0);\n }else {//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }\n }\n \n \n \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n //N円の商品を1000円札のみで買い、お釣りを表示\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int money = 1000;\n \n \n \n if (N % money == 0) {//お釣りなし\n System.out.println(0);\n }else {//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }\n }\n \n \n \n}",
"Main",
"public static void main(String[] args) {\n //N円の商品を1000円札のみで買い、お釣りを表示\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int money = 1000;\n \n \n \n if (N % money == 0) {//お釣りなし\n System.out.println(0);\n }else {//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }\n }",
"main",
"{\n //N円の商品を1000円札のみで買い、お釣りを表示\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int money = 1000;\n \n \n \n if (N % money == 0) {//お釣りなし\n System.out.println(0);\n }else {//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int money = 1000;",
"money",
"1000",
"if (N % money == 0) {//お釣りなし\n System.out.println(0);\n }else {//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }",
"N % money == 0",
"N % money",
"N",
"money",
"0",
"{//お釣りなし\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }",
"money = (N/money +1)*1000",
"money",
"(N/money +1)*1000",
"(N/money +1)",
"N/money",
"N",
"money",
"1",
"1000",
"System.out.println(money-N)",
"System.out.println",
"System.out",
"System",
"System.out",
"money-N",
"money",
"N",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n //N円の商品を1000円札のみで買い、お釣りを表示\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int money = 1000;\n \n \n \n if (N % money == 0) {//お釣りなし\n System.out.println(0);\n }else {//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }\n }\n \n \n \n}",
"public class Main {\n public static void main(String[] args) {\n //N円の商品を1000円札のみで買い、お釣りを表示\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int money = 1000;\n \n \n \n if (N % money == 0) {//お釣りなし\n System.out.println(0);\n }else {//お釣りあり\n money = (N/money +1)*1000;\n System.out.println(money-N);\n }\n }\n \n \n \n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//N円の商品を1000円札のみで買い、お釣りを表示
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int money = 1000;
if (N % money == 0) {//お釣りなし
System.out.println(0);
}else {//お釣りあり
money = (N/money +1)*1000;
System.out.println(money-N);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
71,
20
],
[
71,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
33,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
23,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
23,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
48,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
21,
68
],
[
68,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\nimport static java.lang.Integer.parseInt;\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter prnt = new PrintWriter(System.out);\n\t\tStringBuilder sb = new StringBuilder();\n StringTokenizer st = new StringTokenizer(read.readLine());\n \n int n = parseInt(st.nextToken());\n \n int a = n % 1000;\n \n if(a==0) {\n \tSystem.out.println(0);\n }\n else {\n \tSystem.out.println(1000-a);\n }\n\n\t}\n\n\t\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import static java.lang.Integer.parseInt;",
"import static java.lang.Integer.parseInt;",
"import static java.lang.Integer.parseInt;",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter prnt = new PrintWriter(System.out);\n\t\tStringBuilder sb = new StringBuilder();\n StringTokenizer st = new StringTokenizer(read.readLine());\n \n int n = parseInt(st.nextToken());\n \n int a = n % 1000;\n \n if(a==0) {\n \tSystem.out.println(0);\n }\n else {\n \tSystem.out.println(1000-a);\n }\n\n\t}\n\n\t\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter prnt = new PrintWriter(System.out);\n\t\tStringBuilder sb = new StringBuilder();\n StringTokenizer st = new StringTokenizer(read.readLine());\n \n int n = parseInt(st.nextToken());\n \n int a = n % 1000;\n \n if(a==0) {\n \tSystem.out.println(0);\n }\n else {\n \tSystem.out.println(1000-a);\n }\n\n\t}",
"main",
"{\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter prnt = new PrintWriter(System.out);\n\t\tStringBuilder sb = new StringBuilder();\n StringTokenizer st = new StringTokenizer(read.readLine());\n \n int n = parseInt(st.nextToken());\n \n int a = n % 1000;\n \n if(a==0) {\n \tSystem.out.println(0);\n }\n else {\n \tSystem.out.println(1000-a);\n }\n\n\t}",
"BufferedReader read = new BufferedReader(new InputStreamReader(System.in));",
"read",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter prnt = new PrintWriter(System.out);",
"prnt",
"new PrintWriter(System.out)",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"StringTokenizer st = new StringTokenizer(read.readLine());",
"st",
"new StringTokenizer(read.readLine())",
"int n = parseInt(st.nextToken());",
"n",
"parseInt(st.nextToken())",
"parseInt",
"st.nextToken()",
"st.nextToken",
"st",
"int a = n % 1000;",
"a",
"n % 1000",
"n",
"1000",
"if(a==0) {\n \tSystem.out.println(0);\n }\n else {\n \tSystem.out.println(1000-a);\n }",
"a==0",
"a",
"0",
"{\n \tSystem.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n \tSystem.out.println(1000-a);\n }",
"System.out.println(1000-a)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-a",
"1000",
"a",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter prnt = new PrintWriter(System.out);\n\t\tStringBuilder sb = new StringBuilder();\n StringTokenizer st = new StringTokenizer(read.readLine());\n \n int n = parseInt(st.nextToken());\n \n int a = n % 1000;\n \n if(a==0) {\n \tSystem.out.println(0);\n }\n else {\n \tSystem.out.println(1000-a);\n }\n\n\t}\n\n\t\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter prnt = new PrintWriter(System.out);\n\t\tStringBuilder sb = new StringBuilder();\n StringTokenizer st = new StringTokenizer(read.readLine());\n \n int n = parseInt(st.nextToken());\n \n int a = n % 1000;\n \n if(a==0) {\n \tSystem.out.println(0);\n }\n else {\n \tSystem.out.println(1000-a);\n }\n\n\t}\n\n\t\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import static java.lang.Integer.parseInt;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
PrintWriter prnt = new PrintWriter(System.out);
StringBuilder sb = new StringBuilder();
StringTokenizer st = new StringTokenizer(read.readLine());
int n = parseInt(st.nextToken());
int a = n % 1000;
if(a==0) {
System.out.println(0);
}
else {
System.out.println(1000-a);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
17,
30,
14,
2,
2,
13,
13,
17,
30,
0,
13,
17,
30,
4,
18,
18,
13,
13,
2,
13,
13,
3,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
46,
5
],
[
46,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
33,
42
],
[
6,
43
],
[
43,
44
],
[
0,
45
],
[
45,
46
],
[
45,
47
]
]
| [
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] agrs){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint satu = 1000;\n\t\twhile(true){\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] agrs){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint satu = 1000;\n\t\twhile(true){\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] agrs){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint satu = 1000;\n\t\twhile(true){\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint satu = 1000;\n\t\twhile(true){\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int satu = 1000;",
"satu",
"1000",
"while(true){\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"true",
"{\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}",
"satu - n < 0",
"satu - n",
"satu",
"n",
"0",
"{\n\t\t\t\tsatu += 1000;\n\t\t\t}",
"satu += 1000",
"satu",
"1000",
"{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}",
"System.out.print(satu - n)",
"System.out.print",
"System.out",
"System",
"System.out",
"satu - n",
"satu",
"n",
"break;",
"String[] agrs",
"agrs",
"public class Main{\n\tpublic static void main(String[] agrs){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint satu = 1000;\n\t\twhile(true){\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] agrs){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint satu = 1000;\n\t\twhile(true){\n\t\t\tif(satu - n < 0){\n\t\t\t\tsatu += 1000;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.print(satu - n);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] agrs){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int satu = 1000;
while(true){
if(satu - n < 0){
satu += 1000;
}
else{
System.out.print(satu - n);
break;
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
17,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
35,
5
],
[
35,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
6,
32
],
[
32,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint n= sc.nextInt();\n \tint ans = (10000-n)%1000;\n System.out.println(\"\"+ans);\n}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint n= sc.nextInt();\n \tint ans = (10000-n)%1000;\n System.out.println(\"\"+ans);\n}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint n= sc.nextInt();\n \tint ans = (10000-n)%1000;\n System.out.println(\"\"+ans);\n}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n \tint n= sc.nextInt();\n \tint ans = (10000-n)%1000;\n System.out.println(\"\"+ans);\n}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n= sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = (10000-n)%1000;",
"ans",
"(10000-n)%1000",
"(10000-n)",
"10000",
"n",
"1000",
"System.out.println(\"\"+ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"\"\"+ans",
"\"\"",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint n= sc.nextInt();\n \tint ans = (10000-n)%1000;\n System.out.println(\"\"+ans);\n}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint n= sc.nextInt();\n \tint ans = (10000-n)%1000;\n System.out.println(\"\"+ans);\n}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n= sc.nextInt();
int ans = (10000-n)%1000;
System.out.println(""+ans);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
2,
2,
13,
17,
17,
2,
17,
2,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
37,
5
],
[
37,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
22,
33
],
[
6,
34
],
[
34,
35
],
[
0,
36
],
[
36,
37
],
[
36,
38
]
]
| [
"\n\n\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0);\n }",
"main",
"{\n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0);\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int n = input.nextInt();",
"n",
"input.nextInt()",
"input.nextInt",
"input",
"System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0)",
"System.out.println",
"System.out",
"System",
"System.out",
"n % 1000 > 0 ? 1000 - n % 1000 : 0",
"n % 1000 > 0",
"n % 1000",
"n",
"1000",
"0",
"1000 - n % 1000",
"1000",
"n % 1000",
"n",
"1000",
"0",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int n = input.nextInt();\n System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0);\n }\n}",
"Main"
]
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
System.out.println(n % 1000 > 0 ? 1000 - n % 1000 : 0);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
2,
13,
17,
17,
30,
0,
13,
17,
30,
0,
13,
2,
17,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
47,
5
],
[
47,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
6,
44
],
[
44,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint result = 0;\n\n\t\tif(n % 1000 == 0) {\n\t\t\tresult = 0;\n\t\t}else {\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint result = 0;\n\n\t\tif(n % 1000 == 0) {\n\t\t\tresult = 0;\n\t\t}else {\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint result = 0;\n\n\t\tif(n % 1000 == 0) {\n\t\t\tresult = 0;\n\t\t}else {\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint result = 0;\n\n\t\tif(n % 1000 == 0) {\n\t\t\tresult = 0;\n\t\t}else {\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int result = 0;",
"result",
"0",
"if(n % 1000 == 0) {\n\t\t\tresult = 0;\n\t\t}else {\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"{\n\t\t\tresult = 0;\n\t\t}",
"result = 0",
"result",
"0",
"{\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}",
"result = 1000 - (n % 1000)",
"result",
"1000 - (n % 1000)",
"1000",
"(n % 1000)",
"n",
"1000",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint result = 0;\n\n\t\tif(n % 1000 == 0) {\n\t\t\tresult = 0;\n\t\t}else {\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint result = 0;\n\n\t\tif(n % 1000 == 0) {\n\t\t\tresult = 0;\n\t\t}else {\n\t\t\tresult = 1000 - (n % 1000);\n\t\t}\n\n\t\tSystem.out.println(result);\n\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int result = 0;
if(n % 1000 == 0) {
result = 0;
}else {
result = 1000 - (n % 1000);
}
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
17,
41,
13,
2,
13,
17,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
0,
13,
2,
17,
2,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
69,
5
],
[
69,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
21,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
37,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
50,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
6,
66
],
[
66,
67
],
[
0,
68
],
[
68,
69
],
[
68,
70
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tif(number == 10000) {\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}\n\t\tint ans = number/1000;\n\t\t\n\t\tif(number%1000 == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse {\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tif(number == 10000) {\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}\n\t\tint ans = number/1000;\n\t\t\n\t\tif(number%1000 == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse {\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tif(number == 10000) {\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}\n\t\tint ans = number/1000;\n\t\t\n\t\tif(number%1000 == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse {\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tif(number == 10000) {\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}\n\t\tint ans = number/1000;\n\t\t\n\t\tif(number%1000 == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse {\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int number = sc.nextInt();",
"number",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(number == 10000) {\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}",
"number == 10000",
"number",
"10000",
"{\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.exit(0)",
"System.exit",
"System",
"0",
"int ans = number/1000;",
"ans",
"number/1000",
"number",
"1000",
"if(number%1000 == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse {\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}",
"number%1000 == 0",
"number%1000",
"number",
"1000",
"0",
"{\n\t\t\tSystem.out.println(0);\n\t\t}",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}",
"ans = 1000-(number - ans*1000)",
"ans",
"1000-(number - ans*1000)",
"1000",
"(number - ans*1000)",
"number",
"ans*1000",
"ans",
"1000",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tif(number == 10000) {\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}\n\t\tint ans = number/1000;\n\t\t\n\t\tif(number%1000 == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse {\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tif(number == 10000) {\n\t\t\tSystem.out.println(0);\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t}\n\t\tint ans = number/1000;\n\t\t\n\t\tif(number%1000 == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse {\n\t\t\tans = 1000-(number - ans*1000);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
if(number == 10000) {
System.out.println(0);
System.exit(0);
}
int ans = number/1000;
if(number%1000 == 0) {
System.out.println(0);
}
else {
ans = 1000-(number - ans*1000);
System.out.println(ans);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
17,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
49,
11
],
[
49,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
17,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
20,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
34,
35
],
[
27,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
12,
46
],
[
46,
47
],
[
0,
48
],
[
48,
49
],
[
48,
50
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tint price;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tint price;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tint price;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"main",
"{\n\t\tint price;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"int price;",
"price",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"try {\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t}",
"price =Integer.parseInt(reader.readLine())",
"price",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"System.out.println((10000 - price) % 1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"(10000 - price) % 1000",
"(10000 - price)",
"10000",
"price",
"1000",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tint price;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tint price;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\tprice =Integer.parseInt(reader.readLine());\n\t\t\tSystem.out.println((10000 - price) % 1000);\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) {
int price;
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
price =Integer.parseInt(reader.readLine());
System.out.println((10000 - price) % 1000);
} catch (IOException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
51,
5
],
[
51,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
28,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
6,
48
],
[
48,
49
],
[
0,
50
],
[
50,
51
],
[
50,
52
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n int pien=1000;\n int otsuri=0;\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int amari = N%pien;\n if(amari != 0){\n otsuri = pien-amari;\n }else{\n otsuri = amari;\n }\n System.out.println(otsuri);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n int pien=1000;\n int otsuri=0;\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int amari = N%pien;\n if(amari != 0){\n otsuri = pien-amari;\n }else{\n otsuri = amari;\n }\n System.out.println(otsuri);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n int pien=1000;\n int otsuri=0;\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int amari = N%pien;\n if(amari != 0){\n otsuri = pien-amari;\n }else{\n otsuri = amari;\n }\n System.out.println(otsuri);\n }",
"main",
"{\n int pien=1000;\n int otsuri=0;\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int amari = N%pien;\n if(amari != 0){\n otsuri = pien-amari;\n }else{\n otsuri = amari;\n }\n System.out.println(otsuri);\n }",
"int pien=1000;",
"pien",
"1000",
"int otsuri=0;",
"otsuri",
"0",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int amari = N%pien;",
"amari",
"N%pien",
"N",
"pien",
"if(amari != 0){\n otsuri = pien-amari;\n }else{\n otsuri = amari;\n }",
"amari != 0",
"amari",
"0",
"{\n otsuri = pien-amari;\n }",
"otsuri = pien-amari",
"otsuri",
"pien-amari",
"pien",
"amari",
"{\n otsuri = amari;\n }",
"otsuri = amari",
"otsuri",
"amari",
"System.out.println(otsuri)",
"System.out.println",
"System.out",
"System",
"System.out",
"otsuri",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n int pien=1000;\n int otsuri=0;\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int amari = N%pien;\n if(amari != 0){\n otsuri = pien-amari;\n }else{\n otsuri = amari;\n }\n System.out.println(otsuri);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n int pien=1000;\n int otsuri=0;\n Scanner scanner = new Scanner(System.in);\n int N = scanner.nextInt();\n int amari = N%pien;\n if(amari != 0){\n otsuri = pien-amari;\n }else{\n otsuri = amari;\n }\n System.out.println(otsuri);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
int pien=1000;
int otsuri=0;
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int amari = N%pien;
if(amari != 0){
otsuri = pien-amari;
}else{
otsuri = amari;
}
System.out.println(otsuri);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
12,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
2,
13,
17,
17,
4,
18,
13,
23,
13,
6,
13,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
12,
13,
30,
4,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
29,
4,
13,
12,
13,
30,
14,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
480,
14
],
[
480,
15
],
[
15,
16
],
[
15,
17
],
[
480,
18
],
[
18,
19
],
[
18,
20
],
[
480,
21
],
[
21,
22
],
[
480,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
34,
40
],
[
25,
41
],
[
41,
42
],
[
42,
43
],
[
23,
44
],
[
44,
45
],
[
480,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
46,
53
],
[
53,
54
],
[
53,
55
],
[
46,
57
],
[
57,
58
],
[
57,
59
],
[
46,
60
],
[
60,
61
],
[
60,
62
],
[
46,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
66,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
77,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
73,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
65,
98
],
[
98,
99
],
[
46,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
46,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
122,
124
],
[
114,
125
],
[
125,
126
],
[
46,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
130,
140
],
[
140,
141
],
[
46,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
147,
148
],
[
148,
149
],
[
46,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
153,
157
],
[
157,
158
],
[
152,
159
],
[
159,
160
],
[
159,
161
],
[
152,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
152,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
171,
174
],
[
170,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
152,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
46,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
190,
191
],
[
46,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
195,
199
],
[
199,
200
],
[
194,
201
],
[
201,
202
],
[
201,
203
],
[
194,
204
],
[
204,
205
],
[
204,
206
],
[
194,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
194,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
211,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
215,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
194,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
224,
228
],
[
228,
229
],
[
228,
230
],
[
223,
231
],
[
231,
232
],
[
232,
233
],
[
194,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
238,
242
],
[
242,
243
],
[
242,
244
],
[
237,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
245,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
251,
253
],
[
237,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
255,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
254,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
266,
270
],
[
254,
271
],
[
271,
272
],
[
272,
273
],
[
236,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
46,
278
],
[
278,
279
],
[
278,
280
],
[
280,
281
],
[
281,
282
],
[
282,
283
],
[
46,
284
],
[
284,
285
],
[
284,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
293,
294
],
[
293,
295
],
[
289,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
296,
301
],
[
301,
302
],
[
301,
303
],
[
296,
304
],
[
304,
305
],
[
305,
306
],
[
296,
307
],
[
308,
308
],
[
308,
309
],
[
309,
310
],
[
310,
311
],
[
310,
312
],
[
309,
313
],
[
313,
314
],
[
314,
315
],
[
289,
316
],
[
316,
317
],
[
287,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
318,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
323,
328
],
[
328,
329
],
[
328,
330
],
[
323,
331
],
[
331,
332
],
[
332,
333
],
[
323,
334
],
[
335,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
336,
340
],
[
340,
341
],
[
341,
342
],
[
318,
343
],
[
343,
344
],
[
284,
345
],
[
345,
346
],
[
284,
347
],
[
347,
348
],
[
46,
349
],
[
349,
350
],
[
349,
351
],
[
351,
352
],
[
352,
353
],
[
352,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
358,
359
],
[
358,
360
],
[
354,
361
],
[
361,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
361,
366
],
[
366,
367
],
[
366,
368
],
[
361,
369
],
[
369,
370
],
[
370,
371
],
[
361,
372
],
[
373,
373
],
[
373,
374
],
[
374,
375
],
[
375,
376
],
[
375,
377
],
[
374,
378
],
[
378,
379
],
[
379,
380
],
[
354,
381
],
[
381,
382
],
[
352,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
383,
388
],
[
388,
389
],
[
389,
390
],
[
390,
391
],
[
390,
392
],
[
388,
393
],
[
393,
394
],
[
393,
395
],
[
388,
396
],
[
396,
397
],
[
397,
398
],
[
388,
399
],
[
400,
400
],
[
400,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
401,
405
],
[
405,
406
],
[
406,
407
],
[
383,
408
],
[
408,
409
],
[
349,
410
],
[
410,
411
],
[
349,
412
],
[
412,
413
],
[
46,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
417,
418
],
[
417,
419
],
[
419,
420
],
[
420,
421
],
[
420,
422
],
[
423,
424
],
[
423,
425
],
[
419,
426
],
[
426,
427
],
[
427,
428
],
[
428,
429
],
[
428,
430
],
[
426,
431
],
[
431,
432
],
[
431,
433
],
[
426,
434
],
[
434,
435
],
[
435,
436
],
[
426,
437
],
[
438,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
439,
443
],
[
443,
444
],
[
444,
445
],
[
419,
446
],
[
446,
447
],
[
417,
448
],
[
448,
449
],
[
449,
450
],
[
449,
451
],
[
448,
453
],
[
453,
454
],
[
454,
455
],
[
455,
456
],
[
455,
457
],
[
453,
458
],
[
458,
459
],
[
458,
460
],
[
453,
461
],
[
461,
462
],
[
462,
463
],
[
453,
464
],
[
465,
465
],
[
465,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
466,
470
],
[
470,
471
],
[
471,
472
],
[
448,
473
],
[
473,
474
],
[
414,
475
],
[
475,
476
],
[
414,
477
],
[
477,
478
],
[
0,
479
],
[
479,
480
],
[
479,
481
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.NoSuchElementException;\n\npublic class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\t//static HashMap <String, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\t\n\t\tout.println((1000-n%1000)%1000);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t \n\t public double [] nextDoubleArray(int N, boolean oneBased) {\n\t\t if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }\n\t\t }\n\t\t \n\t }\n\t\n\t\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"public class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\t//static HashMap <String, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\t\n\t\tout.println((1000-n%1000)%1000);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t \n\t public double [] nextDoubleArray(int N, boolean oneBased) {\n\t\t if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }\n\t\t }\n\t\t \n\t }\n\t\n\t\n}",
"Main",
"static FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static int n;",
"n",
"public static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\t\n\t\tout.println((1000-n%1000)%1000);\n\t\t\n\t\tout.flush();\n\t\t\n\t}",
"main",
"{\n\t\tn = sc.nextInt();\n\t\t\n\t\tout.println((1000-n%1000)%1000);\n\t\t\n\t\tout.flush();\n\t\t\n\t}",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"out.println((1000-n%1000)%1000)",
"out.println",
"out",
"(1000-n%1000)%1000",
"(1000-n%1000)",
"1000",
"n%1000",
"n",
"1000",
"1000",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"static class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t \n\t public double [] nextDoubleArray(int N, boolean oneBased) {\n\t\t if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }\n\t\t }\n\t\t \n\t }",
"FastScanner",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }",
"hasNextByte",
"{\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }",
"if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }",
"ptr < buflen",
"ptr",
"buflen",
"{\n\t return true;\n\t }",
"return true;",
"true",
"{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }",
"ptr = 0",
"ptr",
"0",
"try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }",
"catch (IOException e) {\n\t e.printStackTrace();\n\t }",
"IOException e",
"{\n\t e.printStackTrace();\n\t }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t buflen = in.read(buffer);\n\t }",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n\t return false;\n\t }",
"buflen <= 0",
"buflen",
"0",
"{\n\t return false;\n\t }",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }",
"readByte",
"{\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }",
"if (hasNextByte()) return buffer[ptr++];\n\t else return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }",
"isPrintableChar",
"{\n\t return 33 <= c && c <= 126;\n\t }",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }",
"skipUnprintable",
"{\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }",
"while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"ptr++",
"ptr",
"public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }",
"hasNext",
"{\n\t skipUnprintable();\n\t return hasNextByte();\n\t }",
"skipUnprintable()",
"skipUnprintable",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }",
"next",
"{\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }",
"nextDouble",
"{\n\t \treturn Double.parseDouble(next());\n\t }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }",
"nextLong",
"{\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }",
"b == '-'",
"b",
"'-'",
"{\n\t minus = true;\n\t b = readByte();\n\t }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n\t throw new NumberFormatException();\n\t }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }",
"true",
"{\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }",
"if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n\t n *= 10;\n\t n += b - '0';\n\t }",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t return minus ? -n : n;\n\t }",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n\t throw new NumberFormatException();\n\t }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n\t return (int) nextLong();\n\t }",
"nextInt",
"{\n\t return (int) nextLong();\n\t }",
"return (int) nextLong();",
"(int) nextLong()",
"nextLong",
"public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }",
"nextIntArray",
"{\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }",
"if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }",
"oneBased",
"{\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }",
"int[] array = new int[N + 1];",
"array",
"new int[N + 1]",
"N + 1",
"N",
"1",
"for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextInt();\n\t }",
"{\n\t array[i] = sc.nextInt();\n\t }",
"array[i] = sc.nextInt()",
"array[i]",
"array",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"return array;",
"array",
"{\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }",
"int[] array = new int[N];",
"array",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextInt();\n\t }",
"{\n\t array[i] = sc.nextInt();\n\t }",
"array[i] = sc.nextInt()",
"array[i]",
"array",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"return array;",
"array",
"int N",
"N",
"boolean oneBased",
"oneBased",
"public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }",
"nextLongArray",
"{\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }",
"if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }",
"oneBased",
"{\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }",
"long[] array = new long[N + 1];",
"array",
"new long[N + 1]",
"N + 1",
"N",
"1",
"for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextLong();\n\t }",
"{\n\t array[i] = sc.nextLong();\n\t }",
"array[i] = sc.nextLong()",
"array[i]",
"array",
"i",
"sc.nextLong()",
"sc.nextLong",
"sc",
"return array;",
"array",
"{\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }",
"long[] array = new long[N];",
"array",
"new long[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t array[i] = sc.nextLong();\n\t }",
"{\n\t array[i] = sc.nextLong();\n\t }",
"array[i] = sc.nextLong()",
"array[i]",
"array",
"i",
"sc.nextLong()",
"sc.nextLong",
"sc",
"return array;",
"array",
"int N",
"N",
"boolean oneBased",
"oneBased",
"public double [] nextDoubleArray(int N, boolean oneBased) {\n\t\t if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }\n\t\t }",
"nextDoubleArray",
"{\n\t\t if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }\n\t\t }",
"if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }",
"oneBased",
"{\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }",
"double [] array = new double[N + 1];",
"array",
"new double[N + 1]",
"N + 1",
"N",
"1",
"for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t array[i] = sc.nextDouble();\n\t\t }",
"{\n\t\t array[i] = sc.nextDouble();\n\t\t }",
"array[i] = sc.nextDouble()",
"array[i]",
"array",
"i",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"return array;",
"array",
"{\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }",
"double[] array = new double[N];",
"array",
"new double[N]",
"N",
"for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t array[i] = sc.nextDouble();\n\t\t }",
"{\n\t\t array[i] = sc.nextDouble();\n\t\t }",
"array[i] = sc.nextDouble()",
"array[i]",
"array",
"i",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"return array;",
"array",
"int N",
"N",
"boolean oneBased",
"oneBased",
"public class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\t//static HashMap <String, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\t\n\t\tout.println((1000-n%1000)%1000);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t \n\t public double [] nextDoubleArray(int N, boolean oneBased) {\n\t\t if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }\n\t\t }\n\t\t \n\t }\n\t\n\t\n}",
"public class Main{\n\tstatic FastScanner sc = new FastScanner();\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic int n;\n\t//static HashMap <String, Integer> map;\n\t\n\tpublic static void main(String[] args) {\n\t\tn = sc.nextInt();\n\t\t\n\t\tout.println((1000-n%1000)%1000);\n\t\t\n\t\tout.flush();\n\t\t\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t } else {\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\n\t private int readByte() {\n\t if (hasNextByte()) return buffer[ptr++];\n\t else return -1;\n\t }\n\n\t private static boolean isPrintableChar(int c) {\n\t return 33 <= c && c <= 126;\n\t }\n\n\t private void skipUnprintable() {\n\t while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t }\n\n\t public boolean hasNext() {\n\t skipUnprintable();\n\t return hasNextByte();\n\t }\n\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while (isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t \n\t public double nextDouble () {\n\t \treturn Double.parseDouble(next());\n\t }\n\n\t public long nextLong() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t long n = 0;\n\t boolean minus = false;\n\t int b = readByte();\n\t if (b == '-') {\n\t minus = true;\n\t b = readByte();\n\t }\n\t if (b < '0' || '9' < b) {\n\t throw new NumberFormatException();\n\t }\n\t while (true) {\n\t if ('0' <= b && b <= '9') {\n\t n *= 10;\n\t n += b - '0';\n\t } else if (b == -1 || !isPrintableChar(b)) {\n\t return minus ? -n : n;\n\t } else {\n\t throw new NumberFormatException();\n\t }\n\t b = readByte();\n\t }\n\t }\n\n\t public int nextInt() {\n\t return (int) nextLong();\n\t }\n\n\t public int[] nextIntArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t int[] array = new int[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t } else {\n\t int[] array = new int[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextInt();\n\t }\n\t return array;\n\t }\n\t }\n\n\t public long[] nextLongArray(int N, boolean oneBased) {\n\t if (oneBased) {\n\t long[] array = new long[N + 1];\n\t for (int i = 1; i <= N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t } else {\n\t long[] array = new long[N];\n\t for (int i = 0; i < N; i++) {\n\t array[i] = sc.nextLong();\n\t }\n\t return array;\n\t }\n\t }\n\t \n\t public double [] nextDoubleArray(int N, boolean oneBased) {\n\t\t if (oneBased) {\n\t\t double [] array = new double[N + 1];\n\t\t for (int i = 1; i <= N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t } else {\n\t\t double[] array = new double[N];\n\t\t for (int i = 0; i < N; i++) {\n\t\t array[i] = sc.nextDouble();\n\t\t }\n\t\t return array;\n\t\t }\n\t\t }\n\t\t \n\t }\n\t\n\t\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
public class Main{
static FastScanner sc = new FastScanner();
static PrintWriter out = new PrintWriter(System.out);
static int n;
//static HashMap <String, Integer> map;
public static void main(String[] args) {
n = sc.nextInt();
out.println((1000-n%1000)%1000);
out.flush();
}
static class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
} else {
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() {
if (hasNextByte()) return buffer[ptr++];
else return -1;
}
private static boolean isPrintableChar(int c) {
return 33 <= c && c <= 126;
}
private void skipUnprintable() {
while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
}
public boolean hasNext() {
skipUnprintable();
return hasNextByte();
}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public double nextDouble () {
return Double.parseDouble(next());
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while (true) {
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
} else if (b == -1 || !isPrintableChar(b)) {
return minus ? -n : n;
} else {
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
return (int) nextLong();
}
public int[] nextIntArray(int N, boolean oneBased) {
if (oneBased) {
int[] array = new int[N + 1];
for (int i = 1; i <= N; i++) {
array[i] = sc.nextInt();
}
return array;
} else {
int[] array = new int[N];
for (int i = 0; i < N; i++) {
array[i] = sc.nextInt();
}
return array;
}
}
public long[] nextLongArray(int N, boolean oneBased) {
if (oneBased) {
long[] array = new long[N + 1];
for (int i = 1; i <= N; i++) {
array[i] = sc.nextLong();
}
return array;
} else {
long[] array = new long[N];
for (int i = 0; i < N; i++) {
array[i] = sc.nextLong();
}
return array;
}
}
public double [] nextDoubleArray(int N, boolean oneBased) {
if (oneBased) {
double [] array = new double[N + 1];
for (int i = 1; i <= N; i++) {
array[i] = sc.nextDouble();
}
return array;
} else {
double[] array = new double[N];
for (int i = 0; i < N; i++) {
array[i] = sc.nextDouble();
}
return array;
}
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
30,
4,
18,
13,
2,
17,
2,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
52,
8
],
[
52,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
26,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
11,
46
],
[
46,
47
],
[
47,
48
],
[
9,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n int n = Integer.parseInt(br.readLine());\n \n if(n % 1000 != 0){\n out.println(1000 - (n % 1000));\n }else{\n out.println(0);\n }\n \n out.close();\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n int n = Integer.parseInt(br.readLine());\n \n if(n % 1000 != 0){\n out.println(1000 - (n % 1000));\n }else{\n out.println(0);\n }\n \n out.close();\n \n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n int n = Integer.parseInt(br.readLine());\n \n if(n % 1000 != 0){\n out.println(1000 - (n % 1000));\n }else{\n out.println(0);\n }\n \n out.close();\n \n }",
"main",
"{\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n int n = Integer.parseInt(br.readLine());\n \n if(n % 1000 != 0){\n out.println(1000 - (n % 1000));\n }else{\n out.println(0);\n }\n \n out.close();\n \n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"if(n % 1000 != 0){\n out.println(1000 - (n % 1000));\n }else{\n out.println(0);\n }",
"n % 1000 != 0",
"n % 1000",
"n",
"1000",
"0",
"{\n out.println(1000 - (n % 1000));\n }",
"out.println(1000 - (n % 1000))",
"out.println",
"out",
"1000 - (n % 1000)",
"1000",
"(n % 1000)",
"n",
"1000",
"{\n out.println(0);\n }",
"out.println(0)",
"out.println",
"out",
"0",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n int n = Integer.parseInt(br.readLine());\n \n if(n % 1000 != 0){\n out.println(1000 - (n % 1000));\n }else{\n out.println(0);\n }\n \n out.close();\n \n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n \n int n = Integer.parseInt(br.readLine());\n \n if(n % 1000 != 0){\n out.println(1000 - (n % 1000));\n }else{\n out.println(0);\n }\n \n out.close();\n \n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
int n = Integer.parseInt(br.readLine());
if(n % 1000 != 0){
out.println(1000 - (n % 1000));
}else{
out.println(0);
}
out.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
17,
41,
13,
39,
17,
40,
17,
17,
17,
41,
13,
39,
17,
17,
40,
17,
17,
41,
13,
41,
13,
39,
40,
17,
17,
40,
17,
17,
41,
13,
39,
17,
17,
40,
17,
40,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
4,
18,
13,
2,
17,
2,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
23,
13,
12,
13,
30,
14,
2,
2,
2,
2,
13,
17,
2,
13,
13,
2,
13,
17,
2,
13,
13,
30,
29,
17,
29,
17,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
18,
13,
13,
13,
41,
13,
2,
18,
13,
13,
13,
14,
2,
4,
13,
13,
13,
40,
18,
18,
13,
13,
13,
30,
40,
13,
0,
18,
18,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
17,
17,
23,
13,
12,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
301,
11
],
[
301,
12
],
[
12,
13
],
[
12,
14
],
[
301,
15
],
[
15,
16
],
[
15,
17
],
[
301,
18
],
[
18,
19
],
[
301,
20
],
[
20,
21
],
[
20,
22
],
[
301,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
25,
29
],
[
25,
30
],
[
301,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
33,
36
],
[
36,
37
],
[
33,
38
],
[
301,
39
],
[
39,
40
],
[
301,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
43,
47
],
[
47,
48
],
[
43,
49
],
[
301,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
52,
55
],
[
55,
56
],
[
52,
57
],
[
57,
58
],
[
301,
59
],
[
59,
60
],
[
301,
61
],
[
61,
62
],
[
301,
63
],
[
63,
64
],
[
301,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
73,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
67,
92
],
[
92,
93
],
[
93,
94
],
[
65,
95
],
[
95,
96
],
[
301,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
103,
102
],
[
110,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
110,
110
],
[
110,
111
],
[
110,
112
],
[
103,
113
],
[
113,
114
],
[
113,
115
],
[
100,
116
],
[
116,
117
],
[
117,
118
],
[
99,
119
],
[
119,
120
],
[
97,
121
],
[
121,
122
],
[
97,
123
],
[
123,
124
],
[
301,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
128,
139
],
[
140,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
140,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
140,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
157,
160
],
[
156,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
155,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
171,
175
],
[
170,
176
],
[
167,
177
],
[
177,
178
],
[
177,
179
],
[
177,
180
],
[
125,
181
],
[
181,
182
],
[
125,
183
],
[
183,
184
],
[
301,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
185,
194
],
[
194,
195
],
[
301,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
202,
204
],
[
198,
205
],
[
205,
206
],
[
205,
207
],
[
196,
208
],
[
208,
209
],
[
196,
210
],
[
210,
211
],
[
301,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
212,
216
],
[
216,
217
],
[
212,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
212,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
227,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
237,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
226,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
212,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
256,
259
],
[
259,
260
],
[
212,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
265,
268
],
[
268,
269
],
[
212,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
274,
277
],
[
277,
278
],
[
212,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
281,
285
],
[
285,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
289,
290
],
[
290,
291
],
[
285,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
295,
296
],
[
296,
297
],
[
281,
298
],
[
298,
299
],
[
0,
300
],
[
300,
301
],
[
300,
302
]
]
| [
"import java.io.*;\nimport java.math.*;\nimport java.util.*;\n\n\n\n\n\npublic class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n static boolean [][] grid;\n static int [] bishopr = {-1,1,-1,1};\n static int [] bishopc = {1,1,-1,-1};\n static long H,W,cnt;\n public static void main(String args[]) throws IOException {\n \n int N = in.nextInt();\n if(N%1000!=0)\n out.println(1000-(N%1000));\n else{\n out.println(0);\n }\n\n out.flush();\n }\n static boolean isValid (int r, int c){\n if(r>=0&&r<H&&c>=0&&c<W){\n return true;\n }\n return false;\n }\n private static void dfs(int r, int c) {\n for(int i=0;i<4;i++){\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }\n }\n\n static boolean isEven(long a) {\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n \n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n static boolean [][] grid;\n static int [] bishopr = {-1,1,-1,1};\n static int [] bishopc = {1,1,-1,-1};\n static long H,W,cnt;\n public static void main(String args[]) throws IOException {\n \n int N = in.nextInt();\n if(N%1000!=0)\n out.println(1000-(N%1000));\n else{\n out.println(0);\n }\n\n out.flush();\n }\n static boolean isValid (int r, int c){\n if(r>=0&&r<H&&c>=0&&c<W){\n return true;\n }\n return false;\n }\n private static void dfs(int r, int c) {\n for(int i=0;i<4;i++){\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }\n }\n\n static boolean isEven(long a) {\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n \n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}",
"Main",
"static MyScanner in = new MyScanner();",
"in",
"new MyScanner()",
"static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"int N;",
"N",
"static int max = 200001;",
"max",
"200001",
"static int [] dr = {1,-1,0,0};",
"dr",
"{1,-1,0,0}",
"1",
"-1",
"1",
"0",
"0",
"static int [] dc={0,0,-1,1};",
"dc",
"{0,0,-1,1}",
"0",
"0",
"-1",
"1",
"1",
"static boolean [][] grid;",
"grid",
"static int [] bishopr = {-1,1,-1,1};",
"bishopr",
"{-1,1,-1,1}",
"-1",
"1",
"1",
"-1",
"1",
"1",
"static int [] bishopc = {1,1,-1,-1};",
"bishopc",
"{1,1,-1,-1}",
"1",
"1",
"-1",
"1",
"-1",
"1",
"static long H",
"H",
"W",
"W",
"cnt;",
"cnt",
"public static void main(String args[]) throws IOException {\n \n int N = in.nextInt();\n if(N%1000!=0)\n out.println(1000-(N%1000));\n else{\n out.println(0);\n }\n\n out.flush();\n }",
"main",
"{\n \n int N = in.nextInt();\n if(N%1000!=0)\n out.println(1000-(N%1000));\n else{\n out.println(0);\n }\n\n out.flush();\n }",
"int N = in.nextInt();",
"N",
"in.nextInt()",
"in.nextInt",
"in",
"if(N%1000!=0)\n out.println(1000-(N%1000));\n else{\n out.println(0);\n }",
"N%1000!=0",
"N%1000",
"N",
"1000",
"0",
"out.println(1000-(N%1000))",
"out.println",
"out",
"1000-(N%1000)",
"1000",
"(N%1000)",
"N",
"1000",
"{\n out.println(0);\n }",
"out.println(0)",
"out.println",
"out",
"0",
"out.flush()",
"out.flush",
"out",
"String args[]",
"args",
"static boolean isValid (int r, int c){\n if(r>=0&&r<H&&c>=0&&c<W){\n return true;\n }\n return false;\n }",
"isValid",
"{\n if(r>=0&&r<H&&c>=0&&c<W){\n return true;\n }\n return false;\n }",
"if(r>=0&&r<H&&c>=0&&c<W){\n return true;\n }",
"r>=0&&r<H&&c>=0&&c<W",
"c>=0",
"r>=0&&r<H&&c>=0&&c<W",
"r>=0",
"r",
"0",
"r<H",
"r",
"H",
"c>=0",
"c",
"0",
"c<W",
"c",
"W",
"{\n return true;\n }",
"return true;",
"true",
"return false;",
"false",
"int r",
"r",
"int c",
"c",
"private static void dfs(int r, int c) {\n for(int i=0;i<4;i++){\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }\n }",
"dfs",
"{\n for(int i=0;i<4;i++){\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }\n }",
"for(int i=0;i<4;i++){\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<4",
"i",
"4",
"i++",
"i++",
"i",
"{\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }",
"{\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }",
"int nr = bishopr[i] +r;",
"nr",
"bishopr[i] +r",
"bishopr[i]",
"bishopr",
"i",
"r",
"int nc = bishopc[i]+c;",
"nc",
"bishopc[i]+c",
"bishopc[i]",
"bishopc",
"i",
"c",
"if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }",
"isValid(nr, nc)&&!grid[nr][nc]",
"isValid(nr, nc)",
"isValid",
"nr",
"nc",
"!grid[nr][nc]",
"grid[nr][nc]",
"grid[nr]",
"grid",
"nr",
"nc",
"{\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }",
"cnt++",
"cnt",
"grid[nr][nc] = true",
"grid[nr][nc]",
"grid[nr]",
"grid",
"nr",
"nc",
"true",
"dfs(nr, nc)",
"dfs",
"nr",
"nc",
"int r",
"r",
"int c",
"c",
"static boolean isEven(long a) {\n return (a&1)==0;\n }",
"isEven",
"{\n return (a&1)==0;\n }",
"return (a&1)==0;",
"(a&1)==0",
"(a&1)",
"a",
"1",
"0",
"long a",
"a",
"static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }",
"swap",
"{\n\n int temmp = b;\n b=a;\n a = temmp;\n }",
"int temmp = b;",
"temmp",
"b",
"b=a",
"b",
"a",
"a = temmp",
"a",
"temmp",
"int a",
"a",
"int b",
"b",
"public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }",
"MyScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"MyScanner",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n static boolean [][] grid;\n static int [] bishopr = {-1,1,-1,1};\n static int [] bishopc = {1,1,-1,-1};\n static long H,W,cnt;\n public static void main(String args[]) throws IOException {\n \n int N = in.nextInt();\n if(N%1000!=0)\n out.println(1000-(N%1000));\n else{\n out.println(0);\n }\n\n out.flush();\n }\n static boolean isValid (int r, int c){\n if(r>=0&&r<H&&c>=0&&c<W){\n return true;\n }\n return false;\n }\n private static void dfs(int r, int c) {\n for(int i=0;i<4;i++){\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }\n }\n\n static boolean isEven(long a) {\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n \n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}",
"public class Main {\n\n static MyScanner in = new MyScanner();\n static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));\n int N;\n static int max = 200001;\n static int [] dr = {1,-1,0,0};\n static int [] dc={0,0,-1,1};\n static boolean [][] grid;\n static int [] bishopr = {-1,1,-1,1};\n static int [] bishopc = {1,1,-1,-1};\n static long H,W,cnt;\n public static void main(String args[]) throws IOException {\n \n int N = in.nextInt();\n if(N%1000!=0)\n out.println(1000-(N%1000));\n else{\n out.println(0);\n }\n\n out.flush();\n }\n static boolean isValid (int r, int c){\n if(r>=0&&r<H&&c>=0&&c<W){\n return true;\n }\n return false;\n }\n private static void dfs(int r, int c) {\n for(int i=0;i<4;i++){\n int nr = bishopr[i] +r;\n int nc = bishopc[i]+c;\n if(isValid(nr, nc)&&!grid[nr][nc]){\n cnt++;\n grid[nr][nc] = true;\n dfs(nr, nc);\n }\n }\n }\n\n static boolean isEven(long a) {\n return (a&1)==0;\n }\n static void swap (int a, int b){\n\n int temmp = b;\n b=a;\n a = temmp;\n }\n \n\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }\n}",
"Main"
]
| import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
static MyScanner in = new MyScanner();
static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
int N;
static int max = 200001;
static int [] dr = {1,-1,0,0};
static int [] dc={0,0,-1,1};
static boolean [][] grid;
static int [] bishopr = {-1,1,-1,1};
static int [] bishopc = {1,1,-1,-1};
static long H,W,cnt;
public static void main(String args[]) throws IOException {
int N = in.nextInt();
if(N%1000!=0)
out.println(1000-(N%1000));
else{
out.println(0);
}
out.flush();
}
static boolean isValid (int r, int c){
if(r>=0&&r<H&&c>=0&&c<W){
return true;
}
return false;
}
private static void dfs(int r, int c) {
for(int i=0;i<4;i++){
int nr = bishopr[i] +r;
int nc = bishopc[i]+c;
if(isValid(nr, nc)&&!grid[nr][nc]){
cnt++;
grid[nr][nc] = true;
dfs(nr, nc);
}
}
}
static boolean isEven(long a) {
return (a&1)==0;
}
static void swap (int a, int b){
int temmp = b;
b=a;
a = temmp;
}
public static class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine(){
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
} |
[
7,
6,
13,
12,
13,
30,
41,
13,
4,
18,
20,
41,
13,
14,
2,
2,
13,
17,
17,
30,
0,
13,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
17,
41,
13,
2,
13,
17,
41,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
52,
2
],
[
52,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
5,
11
],
[
11,
12
],
[
5,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
13,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
22,
24
],
[
13,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
5,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
5,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
5,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
3,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"public class Main {\n public static void main(String[] args) {\n int n = new java.util.Scanner(System.in).nextInt();\n int a;\n if(n % 1000 == 0) {\n a = n / 1000;\n } else {\n a = (n / 1000) + 1;\n }\n int b = a * 1000;\n int result = b - n;\n System.out.println(result);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n int n = new java.util.Scanner(System.in).nextInt();\n int a;\n if(n % 1000 == 0) {\n a = n / 1000;\n } else {\n a = (n / 1000) + 1;\n }\n int b = a * 1000;\n int result = b - n;\n System.out.println(result);\n }\n}",
"Main",
"public static void main(String[] args) {\n int n = new java.util.Scanner(System.in).nextInt();\n int a;\n if(n % 1000 == 0) {\n a = n / 1000;\n } else {\n a = (n / 1000) + 1;\n }\n int b = a * 1000;\n int result = b - n;\n System.out.println(result);\n }",
"main",
"{\n int n = new java.util.Scanner(System.in).nextInt();\n int a;\n if(n % 1000 == 0) {\n a = n / 1000;\n } else {\n a = (n / 1000) + 1;\n }\n int b = a * 1000;\n int result = b - n;\n System.out.println(result);\n }",
"int n = new java.util.Scanner(System.in).nextInt();",
"n",
"new java.util.Scanner(System.in).nextInt()",
"new java.util.Scanner(System.in).nextInt",
"new java.util.Scanner(System.in)",
"int a;",
"a",
"if(n % 1000 == 0) {\n a = n / 1000;\n } else {\n a = (n / 1000) + 1;\n }",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"{\n a = n / 1000;\n }",
"a = n / 1000",
"a",
"n / 1000",
"n",
"1000",
"{\n a = (n / 1000) + 1;\n }",
"a = (n / 1000) + 1",
"a",
"(n / 1000) + 1",
"(n / 1000)",
"n",
"1000",
"1",
"int b = a * 1000;",
"b",
"a * 1000",
"a",
"1000",
"int result = b - n;",
"result",
"b - n",
"b",
"n",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n int n = new java.util.Scanner(System.in).nextInt();\n int a;\n if(n % 1000 == 0) {\n a = n / 1000;\n } else {\n a = (n / 1000) + 1;\n }\n int b = a * 1000;\n int result = b - n;\n System.out.println(result);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n int n = new java.util.Scanner(System.in).nextInt();\n int a;\n if(n % 1000 == 0) {\n a = n / 1000;\n } else {\n a = (n / 1000) + 1;\n }\n int b = a * 1000;\n int result = b - n;\n System.out.println(result);\n }\n}",
"Main"
]
| public class Main {
public static void main(String[] args) {
int n = new java.util.Scanner(System.in).nextInt();
int a;
if(n % 1000 == 0) {
a = n / 1000;
} else {
a = (n / 1000) + 1;
}
int b = a * 1000;
int result = b - n;
System.out.println(result);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
41,
5
],
[
41,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
6,
38
],
[
38,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
]
]
| [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n long n = scan.nextLong();\n long g =n%1000;\n if (g == 0){\n g = 1000;\n }\n System.out.println(1000-g);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n long n = scan.nextLong();\n long g =n%1000;\n if (g == 0){\n g = 1000;\n }\n System.out.println(1000-g);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n long n = scan.nextLong();\n long g =n%1000;\n if (g == 0){\n g = 1000;\n }\n System.out.println(1000-g);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n long n = scan.nextLong();\n long g =n%1000;\n if (g == 0){\n g = 1000;\n }\n System.out.println(1000-g);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"long n = scan.nextLong();",
"n",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long g =n%1000;",
"g",
"n%1000",
"n",
"1000",
"if (g == 0){\n g = 1000;\n }",
"g == 0",
"g",
"0",
"{\n g = 1000;\n }",
"g = 1000",
"g",
"1000",
"System.out.println(1000-g)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-g",
"1000",
"g",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n long n = scan.nextLong();\n long g =n%1000;\n if (g == 0){\n g = 1000;\n }\n System.out.println(1000-g);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n long n = scan.nextLong();\n long g =n%1000;\n if (g == 0){\n g = 1000;\n }\n System.out.println(1000-g);\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
long n = scan.nextLong();
long g =n%1000;
if (g == 0){
g = 1000;
}
System.out.println(1000-g);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
2,
13,
17,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
6,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.*;\n\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n \tint n = Integer.parseInt(line);\n \n \tint x = n % 1000;\n \tint answer = 0;\n \tif(x > 0){\n answer = 1000 - x;\n }\n System.out.println(String.valueOf(answer));\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n \tint n = Integer.parseInt(line);\n \n \tint x = n % 1000;\n \tint answer = 0;\n \tif(x > 0){\n answer = 1000 - x;\n }\n System.out.println(String.valueOf(answer));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n \tint n = Integer.parseInt(line);\n \n \tint x = n % 1000;\n \tint answer = 0;\n \tif(x > 0){\n answer = 1000 - x;\n }\n System.out.println(String.valueOf(answer));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n \tint n = Integer.parseInt(line);\n \n \tint x = n % 1000;\n \tint answer = 0;\n \tif(x > 0){\n answer = 1000 - x;\n }\n System.out.println(String.valueOf(answer));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String line = sc.nextLine();",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n = Integer.parseInt(line);",
"n",
"Integer.parseInt(line)",
"Integer.parseInt",
"Integer",
"line",
"int x = n % 1000;",
"x",
"n % 1000",
"n",
"1000",
"int answer = 0;",
"answer",
"0",
"if(x > 0){\n answer = 1000 - x;\n }",
"x > 0",
"x",
"0",
"{\n answer = 1000 - x;\n }",
"answer = 1000 - x",
"answer",
"1000 - x",
"1000",
"x",
"System.out.println(String.valueOf(answer))",
"System.out.println",
"System.out",
"System",
"System.out",
"String.valueOf(answer)",
"String.valueOf",
"String",
"answer",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n \tint n = Integer.parseInt(line);\n \n \tint x = n % 1000;\n \tint answer = 0;\n \tif(x > 0){\n answer = 1000 - x;\n }\n System.out.println(String.valueOf(answer));\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n \tint n = Integer.parseInt(line);\n \n \tint x = n % 1000;\n \tint answer = 0;\n \tif(x > 0){\n answer = 1000 - x;\n }\n System.out.println(String.valueOf(answer));\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
int n = Integer.parseInt(line);
int x = n % 1000;
int answer = 0;
if(x > 0){
answer = 1000 - x;
}
System.out.println(String.valueOf(answer));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
36,
5
],
[
36,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
31,
32
],
[
6,
33
],
[
33,
34
],
[
0,
35
],
[
35,
36
],
[
35,
37
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n Integer cost = sc.nextInt();\n Double d = Math.ceil(cost/1000.0);\n \n System.out.println(new Double((d*1000)-cost).intValue());\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n Integer cost = sc.nextInt();\n Double d = Math.ceil(cost/1000.0);\n \n System.out.println(new Double((d*1000)-cost).intValue());\n }\n}",
"Main",
"public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n Integer cost = sc.nextInt();\n Double d = Math.ceil(cost/1000.0);\n \n System.out.println(new Double((d*1000)-cost).intValue());\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n Integer cost = sc.nextInt();\n Double d = Math.ceil(cost/1000.0);\n \n System.out.println(new Double((d*1000)-cost).intValue());\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"Integer cost = sc.nextInt();",
"cost",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Double d = Math.ceil(cost/1000.0);",
"d",
"Math.ceil(cost/1000.0)",
"Math.ceil",
"Math",
"cost/1000.0",
"cost",
"1000.0",
"System.out.println(new Double((d*1000)-cost).intValue())",
"System.out.println",
"System.out",
"System",
"System.out",
"new Double((d*1000)-cost).intValue()",
"new Double((d*1000)-cost).intValue",
"new Double((d*1000)-cost)",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n Integer cost = sc.nextInt();\n Double d = Math.ceil(cost/1000.0);\n \n System.out.println(new Double((d*1000)-cost).intValue());\n }\n}",
"public class Main {\n\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n Integer cost = sc.nextInt();\n Double d = Math.ceil(cost/1000.0);\n \n System.out.println(new Double((d*1000)-cost).intValue());\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Integer cost = sc.nextInt();
Double d = Math.ceil(cost/1000.0);
System.out.println(new Double((d*1000)-cost).intValue());
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
4,
18,
13,
13,
17,
0,
13,
2,
17,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
36,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
30,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
47,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
47,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
62,
67
],
[
47,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] var0) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int ans = 0;\n\n if (N < 1000) {\n ans = 1000 - N;\n } else if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }\n\n System.out.println(ans);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] var0) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int ans = 0;\n\n if (N < 1000) {\n ans = 1000 - N;\n } else if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }\n\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] var0) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int ans = 0;\n\n if (N < 1000) {\n ans = 1000 - N;\n } else if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }\n\n System.out.println(ans);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int ans = 0;\n\n if (N < 1000) {\n ans = 1000 - N;\n } else if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }\n\n System.out.println(ans);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int ans = 0;",
"ans",
"0",
"if (N < 1000) {\n ans = 1000 - N;\n } else if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }",
"N < 1000",
"N",
"1000",
"{\n ans = 1000 - N;\n }",
"ans = 1000 - N",
"ans",
"1000 - N",
"1000",
"N",
"if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }",
"N % 1000 == 0",
"N % 1000",
"N",
"1000",
"0",
"{\n System.out.println(0);\n System.exit(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }",
"String t = String.valueOf(N);",
"t",
"String.valueOf(N)",
"String.valueOf",
"String",
"N",
"char c = t.charAt(0);",
"c",
"t.charAt(0)",
"t.charAt",
"t",
"0",
"int thousand = Character.getNumericValue(c)*1000;",
"thousand",
"Character.getNumericValue(c)*1000",
"Character.getNumericValue(c)",
"Character.getNumericValue",
"Character",
"c",
"1000",
"ans = 1000 - (N - thousand)",
"ans",
"1000 - (N - thousand)",
"1000",
"(N - thousand)",
"N",
"thousand",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] var0",
"var0",
"public class Main {\n public static void main(String[] var0) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int ans = 0;\n\n if (N < 1000) {\n ans = 1000 - N;\n } else if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }\n\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] var0) {\n Scanner scanner = new Scanner(System.in);\n\n int N = scanner.nextInt();\n int ans = 0;\n\n if (N < 1000) {\n ans = 1000 - N;\n } else if (N % 1000 == 0){\n System.out.println(0);\n System.exit(0);\n } else {\n String t = String.valueOf(N);\n char c = t.charAt(0);\n int thousand = Character.getNumericValue(c)*1000;\n ans = 1000 - (N - thousand);\n }\n\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] var0) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
int ans = 0;
if (N < 1000) {
ans = 1000 - N;
} else if (N % 1000 == 0){
System.out.println(0);
System.exit(0);
} else {
String t = String.valueOf(N);
char c = t.charAt(0);
int thousand = Character.getNumericValue(c)*1000;
ans = 1000 - (N - thousand);
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
13,
29,
14,
2,
2,
2,
4,
18,
13,
18,
13,
17,
17,
2,
4,
18,
13,
18,
13,
17,
17,
2,
4,
18,
13,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
2,
2,
2,
4,
18,
13,
18,
13,
17,
17,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
19,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
30,
39
],
[
8,
40
],
[
40,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
47,
49
],
[
43,
50
],
[
42,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
51,
58
],
[
42,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
59,
66
],
[
40,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
67,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
81,
90
],
[
80,
91
],
[
6,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String[] price = String.valueOf(n).split(\"\");\n\n if (n <= 1000) {\n System.out.println(1000 - n);\n return;\n }\n\n if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {\n System.out.println(0);\n return;\n }\n\n System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String[] price = String.valueOf(n).split(\"\");\n\n if (n <= 1000) {\n System.out.println(1000 - n);\n return;\n }\n\n if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {\n System.out.println(0);\n return;\n }\n\n System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String[] price = String.valueOf(n).split(\"\");\n\n if (n <= 1000) {\n System.out.println(1000 - n);\n return;\n }\n\n if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {\n System.out.println(0);\n return;\n }\n\n System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String[] price = String.valueOf(n).split(\"\");\n\n if (n <= 1000) {\n System.out.println(1000 - n);\n return;\n }\n\n if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {\n System.out.println(0);\n return;\n }\n\n System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String[] price = String.valueOf(n).split(\"\");",
"price",
"String.valueOf(n).split(\"\")",
"String.valueOf(n).split",
"String.valueOf(n)",
"String.valueOf",
"String",
"n",
"\"\"",
"if (n <= 1000) {\n System.out.println(1000 - n);\n return;\n }",
"n <= 1000",
"n",
"1000",
"{\n System.out.println(1000 - n);\n return;\n }",
"System.out.println(1000 - n)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - n",
"1000",
"n",
"return;",
"if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {\n System.out.println(0);\n return;\n }",
"Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0",
"Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0",
"Integer.parseInt(price[1]) == 0",
"Integer.parseInt(price[1])",
"Integer.parseInt",
"Integer",
"price[1]",
"price",
"1",
"0",
"Integer.parseInt(price[2]) == 0",
"Integer.parseInt(price[2])",
"Integer.parseInt",
"Integer",
"price[2]",
"price",
"2",
"0",
"Integer.parseInt(price[3]) == 0",
"Integer.parseInt(price[3])",
"Integer.parseInt",
"Integer",
"price[3]",
"price",
"3",
"0",
"{\n System.out.println(0);\n return;\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"return;",
"System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n)",
"System.out.println",
"System.out",
"System",
"System.out",
"(Integer.parseInt(price[0]) + 1) * 1000 - n",
"(Integer.parseInt(price[0]) + 1) * 1000",
"(Integer.parseInt(price[0]) + 1)",
"Integer.parseInt(price[0])",
"Integer.parseInt",
"Integer",
"price[0]",
"price",
"0",
"1",
"1000",
"n",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String[] price = String.valueOf(n).split(\"\");\n\n if (n <= 1000) {\n System.out.println(1000 - n);\n return;\n }\n\n if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {\n System.out.println(0);\n return;\n }\n\n System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String[] price = String.valueOf(n).split(\"\");\n\n if (n <= 1000) {\n System.out.println(1000 - n);\n return;\n }\n\n if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {\n System.out.println(0);\n return;\n }\n\n System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[] price = String.valueOf(n).split("");
if (n <= 1000) {
System.out.println(1000 - n);
return;
}
if (Integer.parseInt(price[1]) == 0 && Integer.parseInt(price[2]) == 0 && Integer.parseInt(price[3]) == 0) {
System.out.println(0);
return;
}
System.out.println((Integer.parseInt(price[0]) + 1) * 1000 - n);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
41,
13,
2,
17,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
48,
5
],
[
48,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
27,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
6,
45
],
[
45,
46
],
[
0,
47
],
[
47,
48
],
[
47,
49
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\tScanner scn = new Scanner(System.in);\n int p = scn.nextInt();\n int a = p%1000;\n int ans = 1000-a;\n if(a==0){\n System.out.println(\"0\");\n }else{\n \tSystem.out.println(ans);\n }\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\tScanner scn = new Scanner(System.in);\n int p = scn.nextInt();\n int a = p%1000;\n int ans = 1000-a;\n if(a==0){\n System.out.println(\"0\");\n }else{\n \tSystem.out.println(ans);\n }\n\t}\n}",
"Main",
"public static void main(String[] args){\n\tScanner scn = new Scanner(System.in);\n int p = scn.nextInt();\n int a = p%1000;\n int ans = 1000-a;\n if(a==0){\n System.out.println(\"0\");\n }else{\n \tSystem.out.println(ans);\n }\n\t}",
"main",
"{\n\tScanner scn = new Scanner(System.in);\n int p = scn.nextInt();\n int a = p%1000;\n int ans = 1000-a;\n if(a==0){\n System.out.println(\"0\");\n }else{\n \tSystem.out.println(ans);\n }\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int p = scn.nextInt();",
"p",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int a = p%1000;",
"a",
"p%1000",
"p",
"1000",
"int ans = 1000-a;",
"ans",
"1000-a",
"1000",
"a",
"if(a==0){\n System.out.println(\"0\");\n }else{\n \tSystem.out.println(ans);\n }",
"a==0",
"a",
"0",
"{\n System.out.println(\"0\");\n }",
"System.out.println(\"0\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"0\"",
"{\n \tSystem.out.println(ans);\n }",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\tScanner scn = new Scanner(System.in);\n int p = scn.nextInt();\n int a = p%1000;\n int ans = 1000-a;\n if(a==0){\n System.out.println(\"0\");\n }else{\n \tSystem.out.println(ans);\n }\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\tScanner scn = new Scanner(System.in);\n int p = scn.nextInt();\n int a = p%1000;\n int ans = 1000-a;\n if(a==0){\n System.out.println(\"0\");\n }else{\n \tSystem.out.println(ans);\n }\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int p = scn.nextInt();
int a = p%1000;
int ans = 1000-a;
if(a==0){
System.out.println("0");
}else{
System.out.println(ans);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
13,
30,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
6,
38
],
[
38,
39
]
]
| [
"import java.util.*; \nclass Main \n{\npublic static void main(String args[]) \n{\nScanner sc = new Scanner(System.in); \nint n = sc.nextInt(); \nint value = 1000;\n\n\nwhile(value<n)\n{\nvalue=value+1000;\n} \n\nSystem.out.print(value-n);\n} \n}",
"import java.util.*;",
"util.*",
"java",
"class Main \n{\npublic static void main(String args[]) \n{\nScanner sc = new Scanner(System.in); \nint n = sc.nextInt(); \nint value = 1000;\n\n\nwhile(value<n)\n{\nvalue=value+1000;\n} \n\nSystem.out.print(value-n);\n} \n}",
"Main",
"public static void main(String args[]) \n{\nScanner sc = new Scanner(System.in); \nint n = sc.nextInt(); \nint value = 1000;\n\n\nwhile(value<n)\n{\nvalue=value+1000;\n} \n\nSystem.out.print(value-n);\n}",
"main",
"{\nScanner sc = new Scanner(System.in); \nint n = sc.nextInt(); \nint value = 1000;\n\n\nwhile(value<n)\n{\nvalue=value+1000;\n} \n\nSystem.out.print(value-n);\n}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int value = 1000;",
"value",
"1000",
"while(value<n)\n{\nvalue=value+1000;\n}",
"value<n",
"value",
"n",
"{\nvalue=value+1000;\n}",
"value=value+1000",
"value",
"value+1000",
"value",
"1000",
"System.out.print(value-n)",
"System.out.print",
"System.out",
"System",
"System.out",
"value-n",
"value",
"n",
"String args[]",
"args"
]
| import java.util.*;
class Main
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int value = 1000;
while(value<n)
{
value=value+1000;
}
System.out.print(value-n);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
2,
17,
2,
13,
17,
30,
0,
13,
2,
17,
2,
2,
13,
17,
17,
41,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
61,
5
],
[
61,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
25,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
6,
58
],
[
58,
59
],
[
0,
60
],
[
60,
61
],
[
60,
62
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int calc = N % 1000;\n int readyMoney = 0;\n if (calc == 0) {\n readyMoney = 1000 * (N / 1000);\n } else {\n readyMoney = 1000 * (N / 1000 + 1);\n }\n int change = readyMoney - N;\n System.out.println(change);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int calc = N % 1000;\n int readyMoney = 0;\n if (calc == 0) {\n readyMoney = 1000 * (N / 1000);\n } else {\n readyMoney = 1000 * (N / 1000 + 1);\n }\n int change = readyMoney - N;\n System.out.println(change);\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int calc = N % 1000;\n int readyMoney = 0;\n if (calc == 0) {\n readyMoney = 1000 * (N / 1000);\n } else {\n readyMoney = 1000 * (N / 1000 + 1);\n }\n int change = readyMoney - N;\n System.out.println(change);\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int calc = N % 1000;\n int readyMoney = 0;\n if (calc == 0) {\n readyMoney = 1000 * (N / 1000);\n } else {\n readyMoney = 1000 * (N / 1000 + 1);\n }\n int change = readyMoney - N;\n System.out.println(change);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int calc = N % 1000;",
"calc",
"N % 1000",
"N",
"1000",
"int readyMoney = 0;",
"readyMoney",
"0",
"if (calc == 0) {\n readyMoney = 1000 * (N / 1000);\n } else {\n readyMoney = 1000 * (N / 1000 + 1);\n }",
"calc == 0",
"calc",
"0",
"{\n readyMoney = 1000 * (N / 1000);\n }",
"readyMoney = 1000 * (N / 1000)",
"readyMoney",
"1000 * (N / 1000)",
"1000",
"(N / 1000)",
"N",
"1000",
"{\n readyMoney = 1000 * (N / 1000 + 1);\n }",
"readyMoney = 1000 * (N / 1000 + 1)",
"readyMoney",
"1000 * (N / 1000 + 1)",
"1000",
"(N / 1000 + 1)",
"N / 1000",
"N",
"1000",
"1",
"int change = readyMoney - N;",
"change",
"readyMoney - N",
"readyMoney",
"N",
"System.out.println(change)",
"System.out.println",
"System.out",
"System",
"System.out",
"change",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int calc = N % 1000;\n int readyMoney = 0;\n if (calc == 0) {\n readyMoney = 1000 * (N / 1000);\n } else {\n readyMoney = 1000 * (N / 1000 + 1);\n }\n int change = readyMoney - N;\n System.out.println(change);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int calc = N % 1000;\n int readyMoney = 0;\n if (calc == 0) {\n readyMoney = 1000 * (N / 1000);\n } else {\n readyMoney = 1000 * (N / 1000 + 1);\n }\n int change = readyMoney - N;\n System.out.println(change);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int calc = N % 1000;
int readyMoney = 0;
if (calc == 0) {
readyMoney = 1000 * (N / 1000);
} else {
readyMoney = 1000 * (N / 1000 + 1);
}
int change = readyMoney - N;
System.out.println(change);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
4,
18,
13,
17,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
13,
14,
2,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
21,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
32,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
37,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
20,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
58,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
57,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
6,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String n = sc.nextLine();\n sc.close();\n\n if(n.length() == 4) {\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }else if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String n = sc.nextLine();\n sc.close();\n\n if(n.length() == 4) {\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }else if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String n = sc.nextLine();\n sc.close();\n\n if(n.length() == 4) {\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }else if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String n = sc.nextLine();\n sc.close();\n\n if(n.length() == 4) {\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }else if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String n = sc.nextLine();",
"n",
"sc.nextLine()",
"sc.nextLine",
"sc",
"sc.close()",
"sc.close",
"sc",
"if(n.length() == 4) {\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }else if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }",
"n.length() == 4",
"n.length()",
"n.length",
"n",
"4",
"{\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }",
"int bill = Integer.parseInt(n.substring(1, 4));",
"bill",
"Integer.parseInt(n.substring(1, 4))",
"Integer.parseInt",
"Integer",
"n.substring(1, 4)",
"n.substring",
"n",
"1",
"4",
"if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }",
"bill == 0",
"bill",
"0",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n System.out.println(1000 - bill);\n }",
"System.out.println(1000 - bill)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - bill",
"1000",
"bill",
"if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }",
"n.length() == 5",
"n.length()",
"n.length",
"n",
"5",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n System.out.println(1000 - Integer.parseInt(n));\n }",
"System.out.println(1000 - Integer.parseInt(n))",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - Integer.parseInt(n)",
"1000",
"Integer.parseInt(n)",
"Integer.parseInt",
"Integer",
"n",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String n = sc.nextLine();\n sc.close();\n\n if(n.length() == 4) {\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }else if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String n = sc.nextLine();\n sc.close();\n\n if(n.length() == 4) {\n int bill = Integer.parseInt(n.substring(1, 4));\n if(bill == 0) {\n System.out.println(0);\n }else {\n System.out.println(1000 - bill);\n }\n\n }else if(n.length() == 5) {\n System.out.println(0);\n }else {\n System.out.println(1000 - Integer.parseInt(n));\n }\n }\n\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String n = sc.nextLine();
sc.close();
if(n.length() == 4) {
int bill = Integer.parseInt(n.substring(1, 4));
if(bill == 0) {
System.out.println(0);
}else {
System.out.println(1000 - bill);
}
}else if(n.length() == 5) {
System.out.println(0);
}else {
System.out.println(1000 - Integer.parseInt(n));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
51,
5
],
[
51,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
23,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
6,
48
],
[
48,
49
],
[
0,
50
],
[
50,
51
],
[
50,
52
]
]
| [
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n sc.close();\n int s = 0;\n for(int i=1000; s<a; i+=1000){\n s = i;\n }\n System.out.println(s-a);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n sc.close();\n int s = 0;\n for(int i=1000; s<a; i+=1000){\n s = i;\n }\n System.out.println(s-a);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n sc.close();\n int s = 0;\n for(int i=1000; s<a; i+=1000){\n s = i;\n }\n System.out.println(s-a);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n sc.close();\n int s = 0;\n for(int i=1000; s<a; i+=1000){\n s = i;\n }\n System.out.println(s-a);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"int s = 0;",
"s",
"0",
"for(int i=1000; s<a; i+=1000){\n s = i;\n }",
"int i=1000;",
"int i=1000;",
"i",
"1000",
"s<a",
"s",
"a",
"i+=1000",
"i+=1000",
"i",
"1000",
"{\n s = i;\n }",
"{\n s = i;\n }",
"s = i",
"s",
"i",
"System.out.println(s-a)",
"System.out.println",
"System.out",
"System",
"System.out",
"s-a",
"s",
"a",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n sc.close();\n int s = 0;\n for(int i=1000; s<a; i+=1000){\n s = i;\n }\n System.out.println(s-a);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n sc.close();\n int s = 0;\n for(int i=1000; s<a; i+=1000){\n s = i;\n }\n System.out.println(s-a);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
sc.close();
int s = 0;
for(int i=1000; s<a; i+=1000){
s = i;
}
System.out.println(s-a);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
17,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
17,
13,
13,
4,
18,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
75,
26
],
[
75,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
29,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
57,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
27,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
]
| [
"import java.io.BufferedReader;\nimport java.io.*;\nimport java.util.*;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Collections;\nimport java.util.Arrays;\n\npublic class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n\n for(int i = 0; i < 11 ; i++){\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }\n\n\n\n\n \n\n\n\n\n\n \n \n\n\n \n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Iterator;",
"Iterator",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n\n for(int i = 0; i < 11 ; i++){\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }\n\n\n\n\n \n\n\n\n\n\n \n \n\n\n \n\t}\n}",
"Main",
"public static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n\n for(int i = 0; i < 11 ; i++){\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }\n\n\n\n\n \n\n\n\n\n\n \n \n\n\n \n\t}",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n\n for(int i = 0; i < 11 ; i++){\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }\n\n\n\n\n \n\n\n\n\n\n \n \n\n\n \n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < 11 ; i++){\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 11",
"i",
"11",
"i++",
"i++",
"i",
"{\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }",
"{\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }",
"if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }",
"1000 * i >= n",
"1000 * i",
"1000",
"i",
"n",
"{\n System.out.println(1000*i - n);\n System.exit(0);\n }",
"System.out.println(1000*i - n)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000*i - n",
"1000*i",
"1000",
"i",
"n",
"System.exit(0)",
"System.exit",
"System",
"0",
"final String[] args",
"args",
"public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n\n for(int i = 0; i < 11 ; i++){\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }\n\n\n\n\n \n\n\n\n\n\n \n \n\n\n \n\t}\n}",
"public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n\n for(int i = 0; i < 11 ; i++){\n if(1000 * i >= n){\n System.out.println(1000*i - n);\n System.exit(0);\n }\n }\n\n\n\n\n \n\n\n\n\n\n \n \n\n\n \n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;
public class Main {
public static void main(final String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i = 0; i < 11 ; i++){
if(1000 * i >= n){
System.out.println(1000*i - n);
System.exit(0);
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
2,
2,
13,
13,
13,
30,
40,
13,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
6,
45
],
[
45,
46
]
]
| [
"import java.util.*;\n\nclass Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n \n int cash = 1000;\n int count = 1;\n while (cash * count < n) {\n count++;\n }\n \n int payment = cash * count - n;\n System.out.println(payment);\n }\n}\n ",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n \n int cash = 1000;\n int count = 1;\n while (cash * count < n) {\n count++;\n }\n \n int payment = cash * count - n;\n System.out.println(payment);\n }\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n \n int cash = 1000;\n int count = 1;\n while (cash * count < n) {\n count++;\n }\n \n int payment = cash * count - n;\n System.out.println(payment);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n int n = sc.nextInt();\n \n int cash = 1000;\n int count = 1;\n while (cash * count < n) {\n count++;\n }\n \n int payment = cash * count - n;\n System.out.println(payment);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cash = 1000;",
"cash",
"1000",
"int count = 1;",
"count",
"1",
"while (cash * count < n) {\n count++;\n }",
"cash * count < n",
"cash * count",
"cash",
"count",
"n",
"{\n count++;\n }",
"count++",
"count",
"int payment = cash * count - n;",
"payment",
"cash * count - n",
"cash * count",
"cash",
"count",
"n",
"System.out.println(payment)",
"System.out.println",
"System.out",
"System",
"System.out",
"payment",
"String[] args",
"args"
]
| import java.util.*;
class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cash = 1000;
int count = 1;
while (cash * count < n) {
count++;
}
int payment = cash * count - n;
System.out.println(payment);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
2,
17,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
13,
3,
30,
9,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
54,
5
],
[
54,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
29,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
41,
48
],
[
37,
49
],
[
49,
50
],
[
6,
51
],
[
51,
52
],
[
0,
53
],
[
53,
54
],
[
53,
55
]
]
| [
"import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n \n for(int i=0; i<1000; i++) {\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n \n for(int i=0; i<1000; i++) {\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n \n for(int i=0; i<1000; i++) {\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n \n for(int i=0; i<1000; i++) {\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0; i<1000; i++) {\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<1000",
"i",
"1000",
"i++",
"i++",
"i",
"{\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }",
"{\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }",
"int cal = 1000 * i - N;",
"cal",
"1000 * i - N",
"1000 * i",
"1000",
"i",
"N",
"if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }",
"cal >= 0",
"cal",
"0",
"{\n System.out.println(cal);\n break;\n }",
"System.out.println(cal)",
"System.out.println",
"System.out",
"System",
"System.out",
"cal",
"break;",
"{\n continue;\n }",
"continue;",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n \n for(int i=0; i<1000; i++) {\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n \n int N = sc.nextInt();\n \n for(int i=0; i<1000; i++) {\n int cal = 1000 * i - N;\n if(cal >= 0) {\n System.out.println(cal);\n break;\n } else {\n continue;\n }\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
for(int i=0; i<1000; i++) {
int cal = 1000 * i - N;
if(cal >= 0) {
System.out.println(cal);
break;
} else {
continue;
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
17,
30,
29,
17,
30,
29,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
6,
28
],
[
28,
29
],
[
52,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
33,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
30,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(calc(n));\n sc.close();\n }\n\n public static int calc(int n){\n if(n % 1000 == 0){\n return 0;\n }else{\n return 1000 - n % 1000;\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(calc(n));\n sc.close();\n }\n\n public static int calc(int n){\n if(n % 1000 == 0){\n return 0;\n }else{\n return 1000 - n % 1000;\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(calc(n));\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(calc(n));\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(calc(n))",
"System.out.println",
"System.out",
"System",
"System.out",
"calc(n)",
"calc",
"n",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public static int calc(int n){\n if(n % 1000 == 0){\n return 0;\n }else{\n return 1000 - n % 1000;\n }\n }",
"calc",
"{\n if(n % 1000 == 0){\n return 0;\n }else{\n return 1000 - n % 1000;\n }\n }",
"if(n % 1000 == 0){\n return 0;\n }else{\n return 1000 - n % 1000;\n }",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"{\n return 0;\n }",
"return 0;",
"0",
"{\n return 1000 - n % 1000;\n }",
"return 1000 - n % 1000;",
"1000 - n % 1000",
"1000",
"n % 1000",
"n",
"1000",
"int n",
"n",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(calc(n));\n sc.close();\n }\n\n public static int calc(int n){\n if(n % 1000 == 0){\n return 0;\n }else{\n return 1000 - n % 1000;\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(calc(n));\n sc.close();\n }\n\n public static int calc(int n){\n if(n % 1000 == 0){\n return 0;\n }else{\n return 1000 - n % 1000;\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(calc(n));
sc.close();
}
public static int calc(int n){
if(n % 1000 == 0){
return 0;
}else{
return 1000 - n % 1000;
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
17,
13,
12,
13,
30,
4,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
19,
20
],
[
20,
21
],
[
10,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
10,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
53,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
45,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }\n }\n\n\n public static void main(String[] args) {\n abc173_a();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }\n }\n\n\n public static void main(String[] args) {\n abc173_a();\n }\n}",
"Main",
"public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }\n }",
"abc173_a",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }",
"{\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int a = Integer.parseInt(sc.next());",
"a",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int change = a % 1000;",
"change",
"a % 1000",
"a",
"1000",
"if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);",
"change == 0",
"change",
"0",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.out.println(1000 - change)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - change",
"1000",
"change",
"public static void main(String[] args) {\n abc173_a();\n }",
"main",
"{\n abc173_a();\n }",
"abc173_a()",
"abc173_a",
"String[] args",
"args",
"public class Main {\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }\n }\n\n\n public static void main(String[] args) {\n abc173_a();\n }\n}",
"public class Main {\n public static void abc173_a() {\n try (Scanner sc = new Scanner(System.in)) {\n int a = Integer.parseInt(sc.next());\n int change = a % 1000;\n if (change == 0)\n System.out.println(0);\n else\n System.out.println(1000 - change);\n }\n }\n\n\n public static void main(String[] args) {\n abc173_a();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void abc173_a() {
try (Scanner sc = new Scanner(System.in)) {
int a = Integer.parseInt(sc.next());
int change = a % 1000;
if (change == 0)
System.out.println(0);
else
System.out.println(1000 - change);
}
}
public static void main(String[] args) {
abc173_a();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
17,
30,
14,
2,
13,
17,
30,
3,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
22,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
6,
43
],
[
43,
44
]
]
| [
"import java.util.Scanner;\n \nclass Main {\n\tpublic static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int senen = 1000;\n\t \n\t while (true) {\n\t if (N <= 0) { break; }\n\t N = N - senen;\n\t }\n\t \n\t System.out.println(Math.abs(N));\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int senen = 1000;\n\t \n\t while (true) {\n\t if (N <= 0) { break; }\n\t N = N - senen;\n\t }\n\t \n\t System.out.println(Math.abs(N));\n }\n}",
"Main",
"public static void main(String[] args) {\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int senen = 1000;\n\t \n\t while (true) {\n\t if (N <= 0) { break; }\n\t N = N - senen;\n\t }\n\t \n\t System.out.println(Math.abs(N));\n }",
"main",
"{\n \n\t Scanner sc = new Scanner(System.in);\n\t int N = sc.nextInt();\n\t int senen = 1000;\n\t \n\t while (true) {\n\t if (N <= 0) { break; }\n\t N = N - senen;\n\t }\n\t \n\t System.out.println(Math.abs(N));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int senen = 1000;",
"senen",
"1000",
"while (true) {\n\t if (N <= 0) { break; }\n\t N = N - senen;\n\t }",
"true",
"{\n\t if (N <= 0) { break; }\n\t N = N - senen;\n\t }",
"if (N <= 0) { break; }",
"N <= 0",
"N",
"0",
"{ break; }",
"break;",
"N = N - senen",
"N",
"N - senen",
"N",
"senen",
"System.out.println(Math.abs(N))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.abs(N)",
"Math.abs",
"Math",
"N",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int senen = 1000;
while (true) {
if (N <= 0) { break; }
N = N - senen;
}
System.out.println(Math.abs(N));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
183,
5
],
[
183,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
24,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
20,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
36,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
52,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
72,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
68,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
84,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
104,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
100,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
120,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
116,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
136,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
132,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
155,
157
],
[
152,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
158,
163
],
[
148,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
171,
173
],
[
168,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
174,
179
],
[
6,
180
],
[
180,
181
],
[
0,
182
],
[
182,
183
],
[
182,
184
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int s=0;\n if(n<=1000){\n s=1000-n;\n System.out.println(s);\n }else if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }\n \n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int s=0;\n if(n<=1000){\n s=1000-n;\n System.out.println(s);\n }else if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }\n \n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int s=0;\n if(n<=1000){\n s=1000-n;\n System.out.println(s);\n }else if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }\n \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int s=0;\n if(n<=1000){\n s=1000-n;\n System.out.println(s);\n }else if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int s=0;",
"s",
"0",
"if(n<=1000){\n s=1000-n;\n System.out.println(s);\n }else if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=1000",
"n",
"1000",
"{\n s=1000-n;\n System.out.println(s);\n }",
"s=1000-n",
"s",
"1000-n",
"1000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=2000",
"n",
"2000",
"{\n s=2000-n;\n System.out.println(s);\n }",
"s=2000-n",
"s",
"2000-n",
"2000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=3000",
"n",
"3000",
"{\n s=3000-n;\n System.out.println(s);\n }",
"s=3000-n",
"s",
"3000-n",
"3000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=4000",
"n",
"4000",
"{\n s=4000-n;\n System.out.println(s);\n }",
"s=4000-n",
"s",
"4000-n",
"4000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=5000",
"n",
"5000",
"{\n s=5000-n;\n System.out.println(s);\n }",
"s=5000-n",
"s",
"5000-n",
"5000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=6000",
"n",
"6000",
"{\n s=6000-n;\n System.out.println(s);\n }",
"s=6000-n",
"s",
"6000-n",
"6000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=7000",
"n",
"7000",
"{\n s=7000-n;\n System.out.println(s);\n }",
"s=7000-n",
"s",
"7000-n",
"7000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=8000",
"n",
"8000",
"{\n s=8000-n;\n System.out.println(s);\n }",
"s=8000-n",
"s",
"8000-n",
"8000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=9000",
"n",
"9000",
"{\n s=9000-n;\n System.out.println(s);\n }",
"s=9000-n",
"s",
"9000-n",
"9000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }",
"n<=10000",
"n",
"10000",
"{\n s=10000-n;\n System.out.println(s);\n }",
"s=10000-n",
"s",
"10000-n",
"10000",
"n",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int s=0;\n if(n<=1000){\n s=1000-n;\n System.out.println(s);\n }else if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }\n \n }\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int s=0;\n if(n<=1000){\n s=1000-n;\n System.out.println(s);\n }else if(n<=2000){\n s=2000-n;\n System.out.println(s);\n }else if(n<=3000){\n s=3000-n;\n System.out.println(s);\n }else if(n<=4000){\n s=4000-n;\n System.out.println(s);\n }else if(n<=5000){\n s=5000-n;\n System.out.println(s);\n }else if(n<=6000){\n s=6000-n;\n System.out.println(s);\n }else if(n<=7000){\n s=7000-n;\n System.out.println(s);\n }else if(n<=8000){\n s=8000-n;\n System.out.println(s);\n }else if(n<=9000){\n s=9000-n;\n System.out.println(s);\n }else if(n<=10000){\n s=10000-n;\n System.out.println(s);\n }\n \n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int s=0;
if(n<=1000){
s=1000-n;
System.out.println(s);
}else if(n<=2000){
s=2000-n;
System.out.println(s);
}else if(n<=3000){
s=3000-n;
System.out.println(s);
}else if(n<=4000){
s=4000-n;
System.out.println(s);
}else if(n<=5000){
s=5000-n;
System.out.println(s);
}else if(n<=6000){
s=6000-n;
System.out.println(s);
}else if(n<=7000){
s=7000-n;
System.out.println(s);
}else if(n<=8000){
s=8000-n;
System.out.println(s);
}else if(n<=9000){
s=9000-n;
System.out.println(s);
}else if(n<=10000){
s=10000-n;
System.out.println(s);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
2,
2,
17,
2,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
44,
5
],
[
44,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
6,
28
],
[
28,
29
],
[
44,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
34,
40
],
[
30,
41
],
[
41,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n System.out.println(solve(N));\n\n sc.close();\n }\n\n static int solve(int N) {\n return (1000 - N % 1000) % 1000;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n System.out.println(solve(N));\n\n sc.close();\n }\n\n static int solve(int N) {\n return (1000 - N % 1000) % 1000;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n System.out.println(solve(N));\n\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n System.out.println(solve(N));\n\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(solve(N))",
"System.out.println",
"System.out",
"System",
"System.out",
"solve(N)",
"solve",
"N",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"static int solve(int N) {\n return (1000 - N % 1000) % 1000;\n }",
"solve",
"{\n return (1000 - N % 1000) % 1000;\n }",
"return (1000 - N % 1000) % 1000;",
"(1000 - N % 1000) % 1000",
"(1000 - N % 1000)",
"1000",
"N % 1000",
"N",
"1000",
"1000",
"int N",
"N",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n System.out.println(solve(N));\n\n sc.close();\n }\n\n static int solve(int N) {\n return (1000 - N % 1000) % 1000;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n System.out.println(solve(N));\n\n sc.close();\n }\n\n static int solve(int N) {\n return (1000 - N % 1000) % 1000;\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
System.out.println(solve(N));
sc.close();
}
static int solve(int N) {
return (1000 - N % 1000) % 1000;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
17,
2,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
48,
5
],
[
48,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
27,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
6,
45
],
[
45,
46
],
[
0,
47
],
[
47,
48
],
[
47,
49
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = Integer.parseInt(s.nextLine());\n int num = 1000 - N%1000;\n if (num == 1000){\n System.out.println(0);\n } else {\n System.out.println(num);\n }\n\n// int W = Integer.parseInt(s.nextLine());\n// int K = Integer.parseInt(s.nextLine());\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = Integer.parseInt(s.nextLine());\n int num = 1000 - N%1000;\n if (num == 1000){\n System.out.println(0);\n } else {\n System.out.println(num);\n }\n\n// int W = Integer.parseInt(s.nextLine());\n// int K = Integer.parseInt(s.nextLine());\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = Integer.parseInt(s.nextLine());\n int num = 1000 - N%1000;\n if (num == 1000){\n System.out.println(0);\n } else {\n System.out.println(num);\n }\n\n// int W = Integer.parseInt(s.nextLine());\n// int K = Integer.parseInt(s.nextLine());\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int N = Integer.parseInt(s.nextLine());\n int num = 1000 - N%1000;\n if (num == 1000){\n System.out.println(0);\n } else {\n System.out.println(num);\n }\n\n// int W = Integer.parseInt(s.nextLine());\n// int K = Integer.parseInt(s.nextLine());\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int N = Integer.parseInt(s.nextLine());",
"N",
"Integer.parseInt(s.nextLine())",
"Integer.parseInt",
"Integer",
"s.nextLine()",
"s.nextLine",
"s",
"int num = 1000 - N%1000;",
"num",
"1000 - N%1000",
"1000",
"N%1000",
"N",
"1000",
"if (num == 1000){\n System.out.println(0);\n } else {\n System.out.println(num);\n }",
"num == 1000",
"num",
"1000",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n System.out.println(num);\n }",
"System.out.println(num)",
"System.out.println",
"System.out",
"System",
"System.out",
"num",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = Integer.parseInt(s.nextLine());\n int num = 1000 - N%1000;\n if (num == 1000){\n System.out.println(0);\n } else {\n System.out.println(num);\n }\n\n// int W = Integer.parseInt(s.nextLine());\n// int K = Integer.parseInt(s.nextLine());\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int N = Integer.parseInt(s.nextLine());\n int num = 1000 - N%1000;\n if (num == 1000){\n System.out.println(0);\n } else {\n System.out.println(num);\n }\n\n// int W = Integer.parseInt(s.nextLine());\n// int K = Integer.parseInt(s.nextLine());\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int N = Integer.parseInt(s.nextLine());
int num = 1000 - N%1000;
if (num == 1000){
System.out.println(0);
} else {
System.out.println(num);
}
// int W = Integer.parseInt(s.nextLine());
// int K = Integer.parseInt(s.nextLine());
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
4,
13,
4,
18,
13,
0,
13,
17,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
2,
13,
17,
17,
6,
13,
12,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
13,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
4,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
4,
18,
13,
17,
4,
18,
13,
18,
13,
13,
23,
13,
12,
13,
30,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
0,
37
],
[
37,
38
],
[
37,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
],
[
0,
46
],
[
455,
47
],
[
455,
48
],
[
48,
49
],
[
48,
50
],
[
455,
51
],
[
51,
52
],
[
51,
53
],
[
455,
54
],
[
54,
55
],
[
455,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
455,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
66,
72
],
[
72,
73
],
[
72,
74
],
[
455,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
455,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
455,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
99,
103
],
[
103,
104
],
[
103,
105
],
[
99,
107
],
[
107,
108
],
[
99,
109
],
[
109,
110
],
[
99,
111
],
[
111,
112
],
[
99,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
113,
121
],
[
121,
122
],
[
99,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
126,
131
],
[
131,
132
],
[
125,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
141,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
150,
153
],
[
137,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
158,
159
],
[
159,
160
],
[
125,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
99,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
168,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
168,
181
],
[
181,
182
],
[
181,
183
],
[
168,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
188,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
168,
197
],
[
197,
198
],
[
197,
199
],
[
168,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
200,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
211,
212
],
[
211,
213
],
[
206,
214
],
[
214,
215
],
[
205,
216
],
[
216,
217
],
[
216,
218
],
[
205,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
221,
223
],
[
205,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
168,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
99,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
234,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
239,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
234,
247
],
[
247,
248
],
[
247,
249
],
[
234,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
250,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
257,
258
],
[
254,
259
],
[
259,
260
],
[
259,
261
],
[
261,
262
],
[
234,
263
],
[
263,
264
],
[
263,
265
],
[
234,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
268,
270
],
[
266,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
273,
277
],
[
277,
278
],
[
277,
279
],
[
272,
280
],
[
280,
281
],
[
271,
282
],
[
282,
283
],
[
282,
284
],
[
271,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
287,
289
],
[
271,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
234,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
99,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
303,
304
],
[
300,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
300,
313
],
[
313,
314
],
[
313,
315
],
[
300,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
316,
321
],
[
321,
322
],
[
322,
323
],
[
323,
324
],
[
322,
325
],
[
321,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
300,
330
],
[
330,
331
],
[
331,
332
],
[
332,
333
],
[
99,
334
],
[
334,
335
],
[
334,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
337,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
342,
345
],
[
336,
346
],
[
346,
347
],
[
350,
348
],
[
360,
349
],
[
357,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
350,
354
],
[
354,
355
],
[
354,
356
],
[
357,
357
],
[
357,
358
],
[
357,
359
],
[
360,
360
],
[
360,
361
],
[
360,
362
],
[
350,
363
],
[
363,
364
],
[
363,
365
],
[
365,
366
],
[
334,
367
],
[
367,
368
],
[
99,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
372,
373
],
[
373,
374
],
[
455,
375
],
[
375,
376
],
[
375,
377
],
[
377,
378
],
[
375,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
382,
383
],
[
382,
384
],
[
379,
385
],
[
385,
386
],
[
375,
387
],
[
387,
388
],
[
387,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
391,
393
],
[
390,
394
],
[
387,
395
],
[
395,
396
],
[
375,
397
],
[
397,
398
],
[
397,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
400,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
407,
409
],
[
400,
410
],
[
410,
411
],
[
411,
412
],
[
400,
413
],
[
414,
414
],
[
414,
415
],
[
415,
416
],
[
416,
417
],
[
416,
418
],
[
415,
419
],
[
419,
420
],
[
420,
421
],
[
419,
422
],
[
414,
423
],
[
423,
424
],
[
424,
425
],
[
423,
426
],
[
426,
427
],
[
426,
428
],
[
397,
429
],
[
429,
430
],
[
375,
431
],
[
431,
432
],
[
431,
433
],
[
433,
434
],
[
434,
435
],
[
434,
436
],
[
433,
437
],
[
437,
438
],
[
438,
439
],
[
431,
440
],
[
440,
441
],
[
375,
442
],
[
442,
443
],
[
442,
444
],
[
444,
445
],
[
445,
446
],
[
446,
447
],
[
375,
448
],
[
448,
449
],
[
448,
450
],
[
450,
451
],
[
451,
452
],
[
452,
453
],
[
0,
454
],
[
454,
455
],
[
454,
456
]
]
| [
"import java.io.BufferedWriter;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\nimport java.io.Writer;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.InputMismatchException;\nimport java.util.PriorityQueue;\nimport java.util.Stack;\nimport java.util.StringTokenizer;\nimport java.util.TreeSet;\npublic class Main {\npublic interface SpaceCharFilter {\npublic boolean isSpaceChar(int ch);\n}\n\nclass InputReader {\nprivate InputStream stream;\nprivate byte[] buf = new byte[1024];\nprivate int curChar;\nprivate int numChars;\nprivate SpaceCharFilter filter;\npublic InputReader(InputStream stream) {\nthis.stream = stream;\n}\npublic int read() {\nif (numChars == -1)\nthrow new InputMismatchException();\nif (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}\n\nreturn buf[curChar++];\n\n}\npublic int readInt() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\n\nint res = 0;\n\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\n\n\npublic long readLong() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\nlong res = 0;\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\npublic String readString() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\nc = read();\nStringBuilder res = new StringBuilder();\ndo {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));\nreturn res.toString();\n}\npublic boolean isSpaceChar(int c) {\n\nif (filter != null)\n\nreturn filter.isSpaceChar(c);\n\nreturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n}\npublic String next() {\nreturn readString();\n}\n}\nclass OutputWriter {\nprivate final PrintWriter writer;\npublic OutputWriter(OutputStream outputStream) {\nwriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n}\npublic OutputWriter(Writer writer) {\nthis.writer = new PrintWriter(writer);\n}\npublic void print(Object...objects) {\nfor (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}\n}\npublic void printLine(Object...objects) {\nprint(objects);\nwriter.println();\n}\npublic void close() {\nwriter.close();\n}\npublic void flush() {\nwriter.flush();\n}}\nInputReader in= new InputReader(System.in);\nOutputWriter out = new OutputWriter(System.out);\nStringTokenizer tok;\npublic static void main(String[] args) throws IOException\n{\n new Main().run();\n}\n\nvoid run() throws IOException\n{ \n solve();\n out.flush();\n tok=null;\n}\n\n\nvoid solve() throws IOException{\n\tint n=in.readInt();\n\tout.printLine((1000- (n % 1000))%1000);\n\t\n\t\n\t\n}\n\n}",
"import java.io.BufferedWriter;",
"BufferedWriter",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.io.Writer;",
"Writer",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"import java.util.Stack;",
"Stack",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.util.TreeSet;",
"TreeSet",
"java.util",
"public class Main {\npublic interface SpaceCharFilter {\npublic boolean isSpaceChar(int ch);\n}\n\nclass InputReader {\nprivate InputStream stream;\nprivate byte[] buf = new byte[1024];\nprivate int curChar;\nprivate int numChars;\nprivate SpaceCharFilter filter;\npublic InputReader(InputStream stream) {\nthis.stream = stream;\n}\npublic int read() {\nif (numChars == -1)\nthrow new InputMismatchException();\nif (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}\n\nreturn buf[curChar++];\n\n}\npublic int readInt() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\n\nint res = 0;\n\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\n\n\npublic long readLong() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\nlong res = 0;\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\npublic String readString() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\nc = read();\nStringBuilder res = new StringBuilder();\ndo {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));\nreturn res.toString();\n}\npublic boolean isSpaceChar(int c) {\n\nif (filter != null)\n\nreturn filter.isSpaceChar(c);\n\nreturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n}\npublic String next() {\nreturn readString();\n}\n}\nclass OutputWriter {\nprivate final PrintWriter writer;\npublic OutputWriter(OutputStream outputStream) {\nwriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n}\npublic OutputWriter(Writer writer) {\nthis.writer = new PrintWriter(writer);\n}\npublic void print(Object...objects) {\nfor (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}\n}\npublic void printLine(Object...objects) {\nprint(objects);\nwriter.println();\n}\npublic void close() {\nwriter.close();\n}\npublic void flush() {\nwriter.flush();\n}}\nInputReader in= new InputReader(System.in);\nOutputWriter out = new OutputWriter(System.out);\nStringTokenizer tok;\npublic static void main(String[] args) throws IOException\n{\n new Main().run();\n}\n\nvoid run() throws IOException\n{ \n solve();\n out.flush();\n tok=null;\n}\n\n\nvoid solve() throws IOException{\n\tint n=in.readInt();\n\tout.printLine((1000- (n % 1000))%1000);\n\t\n\t\n\t\n}\n\n}",
"Main",
"InputReader in= new InputReader(System.in);",
"in",
"new InputReader(System.in)",
"OutputWriter out = new OutputWriter(System.out);",
"out",
"new OutputWriter(System.out)",
"StringTokenizer tok;",
"tok",
"public static void main(String[] args) throws IOException\n{\n new Main().run();\n}",
"main",
"{\n new Main().run();\n}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"void run() throws IOException\n{ \n solve();\n out.flush();\n tok=null;\n}",
"run",
"{ \n solve();\n out.flush();\n tok=null;\n}",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"tok=null",
"tok",
"null",
"void solve() throws IOException{\n\tint n=in.readInt();\n\tout.printLine((1000- (n % 1000))%1000);\n\t\n\t\n\t\n}",
"solve",
"{\n\tint n=in.readInt();\n\tout.printLine((1000- (n % 1000))%1000);\n\t\n\t\n\t\n}",
"int n=in.readInt();",
"n",
"in.readInt()",
"in.readInt",
"in",
"out.printLine((1000- (n % 1000))%1000)",
"out.printLine",
"out",
"(1000- (n % 1000))%1000",
"(1000- (n % 1000))",
"1000",
"(n % 1000)",
"n",
"1000",
"1000",
"public interface SpaceCharFilter {\npublic boolean isSpaceChar(int ch);\n}",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"class InputReader {\nprivate InputStream stream;\nprivate byte[] buf = new byte[1024];\nprivate int curChar;\nprivate int numChars;\nprivate SpaceCharFilter filter;\npublic InputReader(InputStream stream) {\nthis.stream = stream;\n}\npublic int read() {\nif (numChars == -1)\nthrow new InputMismatchException();\nif (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}\n\nreturn buf[curChar++];\n\n}\npublic int readInt() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\n\nint res = 0;\n\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\n\n\npublic long readLong() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\nlong res = 0;\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\npublic String readString() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\nc = read();\nStringBuilder res = new StringBuilder();\ndo {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));\nreturn res.toString();\n}\npublic boolean isSpaceChar(int c) {\n\nif (filter != null)\n\nreturn filter.isSpaceChar(c);\n\nreturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n}\npublic String next() {\nreturn readString();\n}\n}",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\nthis.stream = stream;\n}",
"InputReader",
"{\nthis.stream = stream;\n}",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\nif (numChars == -1)\nthrow new InputMismatchException();\nif (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}\n\nreturn buf[curChar++];\n\n}",
"read",
"{\nif (numChars == -1)\nthrow new InputMismatchException();\nif (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}\n\nreturn buf[curChar++];\n\n}",
"if (numChars == -1)\nthrow new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}",
"curChar >= numChars",
"curChar",
"numChars",
"{\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}",
"curChar = 0",
"curChar",
"0",
"try {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}",
"catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}",
"IOException e",
"{\n\nthrow new InputMismatchException();\n\n}",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n\nnumChars = stream.read(buf);\n\n}",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0)\n\nreturn -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int readInt() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\n\nint res = 0;\n\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}",
"readInt",
"{\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\n\nint res = 0;\n\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\nc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}",
"c == '-'",
"c",
"'-'",
"{\n\nsgn = -1;\n\nc = read();\n\n}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"int res = 0;",
"res",
"0",
"do {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n}",
"if (c < '0' || c > '9')\n\nthrow new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public long readLong() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\nlong res = 0;\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}",
"readLong",
"{\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\nlong res = 0;\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\nc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}",
"c == '-'",
"c",
"'-'",
"{\n\nsgn = -1;\n\nc = read();\n\n}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"long res = 0;",
"res",
"0",
"do {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n}",
"if (c < '0' || c > '9')\n\nthrow new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public String readString() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\nc = read();\nStringBuilder res = new StringBuilder();\ndo {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));\nreturn res.toString();\n}",
"readString",
"{\n\nint c = read();\n\nwhile (isSpaceChar(c))\nc = read();\nStringBuilder res = new StringBuilder();\ndo {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));\nreturn res.toString();\n}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\nc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\nres.appendCodePoint(c);\nc = read();\n}",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n\nif (filter != null)\n\nreturn filter.isSpaceChar(c);\n\nreturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n}",
"isSpaceChar",
"{\n\nif (filter != null)\n\nreturn filter.isSpaceChar(c);\n\nreturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n}",
"if (filter != null)\n\nreturn filter.isSpaceChar(c);",
"filter != null",
"filter",
"null",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public String next() {\nreturn readString();\n}",
"next",
"{\nreturn readString();\n}",
"return readString();",
"readString()",
"readString",
"class OutputWriter {\nprivate final PrintWriter writer;\npublic OutputWriter(OutputStream outputStream) {\nwriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n}\npublic OutputWriter(Writer writer) {\nthis.writer = new PrintWriter(writer);\n}\npublic void print(Object...objects) {\nfor (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}\n}\npublic void printLine(Object...objects) {\nprint(objects);\nwriter.println();\n}\npublic void close() {\nwriter.close();\n}\npublic void flush() {\nwriter.flush();\n}}",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\nwriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n}",
"OutputWriter",
"{\nwriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n}",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\nthis.writer = new PrintWriter(writer);\n}",
"OutputWriter",
"{\nthis.writer = new PrintWriter(writer);\n}",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void print(Object...objects) {\nfor (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}\n}",
"print",
"{\nfor (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}\n}",
"for (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < objects.length",
"i",
"objects.length",
"objects",
"objects.length",
"i++",
"i++",
"i",
"{\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}",
"{\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}",
"if (i != 0)\nwriter.print(' ');",
"i != 0",
"i",
"0",
"writer.print(' ')",
"writer.print",
"writer",
"' '",
"writer.print(objects[i])",
"writer.print",
"writer",
"objects[i]",
"objects",
"i",
"Object...objects",
"objects",
"public void printLine(Object...objects) {\nprint(objects);\nwriter.println();\n}",
"printLine",
"{\nprint(objects);\nwriter.println();\n}",
"print(objects)",
"print",
"objects",
"writer.println()",
"writer.println",
"writer",
"Object...objects",
"objects",
"public void close() {\nwriter.close();\n}",
"close",
"{\nwriter.close();\n}",
"writer.close()",
"writer.close",
"writer",
"public void flush() {\nwriter.flush();\n}",
"flush",
"{\nwriter.flush();\n}",
"writer.flush()",
"writer.flush",
"writer",
"public class Main {\npublic interface SpaceCharFilter {\npublic boolean isSpaceChar(int ch);\n}\n\nclass InputReader {\nprivate InputStream stream;\nprivate byte[] buf = new byte[1024];\nprivate int curChar;\nprivate int numChars;\nprivate SpaceCharFilter filter;\npublic InputReader(InputStream stream) {\nthis.stream = stream;\n}\npublic int read() {\nif (numChars == -1)\nthrow new InputMismatchException();\nif (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}\n\nreturn buf[curChar++];\n\n}\npublic int readInt() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\n\nint res = 0;\n\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\n\n\npublic long readLong() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\nlong res = 0;\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\npublic String readString() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\nc = read();\nStringBuilder res = new StringBuilder();\ndo {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));\nreturn res.toString();\n}\npublic boolean isSpaceChar(int c) {\n\nif (filter != null)\n\nreturn filter.isSpaceChar(c);\n\nreturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n}\npublic String next() {\nreturn readString();\n}\n}\nclass OutputWriter {\nprivate final PrintWriter writer;\npublic OutputWriter(OutputStream outputStream) {\nwriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n}\npublic OutputWriter(Writer writer) {\nthis.writer = new PrintWriter(writer);\n}\npublic void print(Object...objects) {\nfor (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}\n}\npublic void printLine(Object...objects) {\nprint(objects);\nwriter.println();\n}\npublic void close() {\nwriter.close();\n}\npublic void flush() {\nwriter.flush();\n}}\nInputReader in= new InputReader(System.in);\nOutputWriter out = new OutputWriter(System.out);\nStringTokenizer tok;\npublic static void main(String[] args) throws IOException\n{\n new Main().run();\n}\n\nvoid run() throws IOException\n{ \n solve();\n out.flush();\n tok=null;\n}\n\n\nvoid solve() throws IOException{\n\tint n=in.readInt();\n\tout.printLine((1000- (n % 1000))%1000);\n\t\n\t\n\t\n}\n\n}",
"public class Main {\npublic interface SpaceCharFilter {\npublic boolean isSpaceChar(int ch);\n}\n\nclass InputReader {\nprivate InputStream stream;\nprivate byte[] buf = new byte[1024];\nprivate int curChar;\nprivate int numChars;\nprivate SpaceCharFilter filter;\npublic InputReader(InputStream stream) {\nthis.stream = stream;\n}\npublic int read() {\nif (numChars == -1)\nthrow new InputMismatchException();\nif (curChar >= numChars) {\ncurChar = 0;\ntry {\n\nnumChars = stream.read(buf);\n\n} catch (IOException e) {\n\nthrow new InputMismatchException();\n\n}\n\nif (numChars <= 0)\n\nreturn -1;\n\n}\n\nreturn buf[curChar++];\n\n}\npublic int readInt() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\n\nint res = 0;\n\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\n\n\npublic long readLong() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\n\nc = read();\n\nint sgn = 1;\n\nif (c == '-') {\n\nsgn = -1;\n\nc = read();\n\n}\nlong res = 0;\ndo {\n\nif (c < '0' || c > '9')\n\nthrow new InputMismatchException();\n\nres *= 10;\n\nres += c - '0';\n\nc = read();\n\n} while (!isSpaceChar(c));\n\nreturn res * sgn;\n\n}\npublic String readString() {\n\nint c = read();\n\nwhile (isSpaceChar(c))\nc = read();\nStringBuilder res = new StringBuilder();\ndo {\n\nres.appendCodePoint(c);\nc = read();\n} while (!isSpaceChar(c));\nreturn res.toString();\n}\npublic boolean isSpaceChar(int c) {\n\nif (filter != null)\n\nreturn filter.isSpaceChar(c);\n\nreturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n}\npublic String next() {\nreturn readString();\n}\n}\nclass OutputWriter {\nprivate final PrintWriter writer;\npublic OutputWriter(OutputStream outputStream) {\nwriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n}\npublic OutputWriter(Writer writer) {\nthis.writer = new PrintWriter(writer);\n}\npublic void print(Object...objects) {\nfor (int i = 0; i < objects.length; i++) {\nif (i != 0)\nwriter.print(' ');\nwriter.print(objects[i]);\n}\n}\npublic void printLine(Object...objects) {\nprint(objects);\nwriter.println();\n}\npublic void close() {\nwriter.close();\n}\npublic void flush() {\nwriter.flush();\n}}\nInputReader in= new InputReader(System.in);\nOutputWriter out = new OutputWriter(System.out);\nStringTokenizer tok;\npublic static void main(String[] args) throws IOException\n{\n new Main().run();\n}\n\nvoid run() throws IOException\n{ \n solve();\n out.flush();\n tok=null;\n}\n\n\nvoid solve() throws IOException{\n\tint n=in.readInt();\n\tout.printLine((1000- (n % 1000))%1000);\n\t\n\t\n\t\n}\n\n}",
"Main"
]
| import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.util.PriorityQueue;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeSet;
public class Main {
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public int readInt() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public long readLong() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public String readString() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public String next() {
return readString();
}
}
class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void print(Object...objects) {
for (int i = 0; i < objects.length; i++) {
if (i != 0)
writer.print(' ');
writer.print(objects[i]);
}
}
public void printLine(Object...objects) {
print(objects);
writer.println();
}
public void close() {
writer.close();
}
public void flush() {
writer.flush();
}}
InputReader in= new InputReader(System.in);
OutputWriter out = new OutputWriter(System.out);
StringTokenizer tok;
public static void main(String[] args) throws IOException
{
new Main().run();
}
void run() throws IOException
{
solve();
out.flush();
tok=null;
}
void solve() throws IOException{
int n=in.readInt();
out.printLine((1000- (n % 1000))%1000);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
0,
13,
2,
40,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
6,
38
],
[
38,
39
]
]
| [
"import java.util.*;\n\nclass Main\n{\n\tpublic static void main(String args[]) throws Exception\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tint n=in.nextInt();\n\t\tint ans=n%1000;\n\t\tif(ans!=0)\n\t\t\tans=-ans+1000;\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n\tpublic static void main(String args[]) throws Exception\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tint n=in.nextInt();\n\t\tint ans=n%1000;\n\t\tif(ans!=0)\n\t\t\tans=-ans+1000;\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String args[]) throws Exception\n\t{\n\t\tScanner in = new Scanner(System.in);\n\t\tint n=in.nextInt();\n\t\tint ans=n%1000;\n\t\tif(ans!=0)\n\t\t\tans=-ans+1000;\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint n=in.nextInt();\n\t\tint ans=n%1000;\n\t\tif(ans!=0)\n\t\t\tans=-ans+1000;\n\t\tSystem.out.println(ans);\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int n=in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int ans=n%1000;",
"ans",
"n%1000",
"n",
"1000",
"if(ans!=0)\n\t\t\tans=-ans+1000;",
"ans!=0",
"ans",
"0",
"ans=-ans+1000",
"ans",
"-ans+1000",
"-ans",
"ans",
"1000",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String args[]",
"args"
]
| import java.util.*;
class Main
{
public static void main(String args[]) throws Exception
{
Scanner in = new Scanner(System.in);
int n=in.nextInt();
int ans=n%1000;
if(ans!=0)
ans=-ans+1000;
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
2,
13,
17,
17,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
32,
39
],
[
31,
40
],
[
9,
41
],
[
41,
42
]
]
| [
"import java.util.*;\nimport java.io.*;\n\nclass Main\n{\n public static void main(String[] args) throws IOException{\n // Solution sol = new Solution();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n int t = Integer.parseInt(st.nextToken());\n \n System.out.println((int)(Math.ceil(t/1000.0)*1000-t));\n\n\n }\n\n \n\n\n \n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n public static void main(String[] args) throws IOException{\n // Solution sol = new Solution();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n int t = Integer.parseInt(st.nextToken());\n \n System.out.println((int)(Math.ceil(t/1000.0)*1000-t));\n\n\n }\n\n \n\n\n \n\n}",
"Main",
"public static void main(String[] args) throws IOException{\n // Solution sol = new Solution();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n int t = Integer.parseInt(st.nextToken());\n \n System.out.println((int)(Math.ceil(t/1000.0)*1000-t));\n\n\n }",
"main",
"{\n // Solution sol = new Solution();\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n int t = Integer.parseInt(st.nextToken());\n \n System.out.println((int)(Math.ceil(t/1000.0)*1000-t));\n\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st = new StringTokenizer(br.readLine());",
"st",
"new StringTokenizer(br.readLine())",
"int t = Integer.parseInt(st.nextToken());",
"t",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"System.out.println((int)(Math.ceil(t/1000.0)*1000-t))",
"System.out.println",
"System.out",
"System",
"System.out",
"(int)(Math.ceil(t/1000.0)*1000-t)",
"Math.ceil(t/1000.0)*1000",
"Math.ceil(t/1000.0)",
"Math.ceil",
"Math",
"t/1000.0",
"t",
"1000.0",
"1000",
"t",
"String[] args",
"args"
]
| import java.util.*;
import java.io.*;
class Main
{
public static void main(String[] args) throws IOException{
// Solution sol = new Solution();
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int t = Integer.parseInt(st.nextToken());
System.out.println((int)(Math.ceil(t/1000.0)*1000-t));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
36,
5
],
[
36,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
6,
33
],
[
33,
34
],
[
0,
35
],
[
35,
36
],
[
35,
37
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\twhile(n > 1000) {\n\t\t\tn -= 1000;\n\t\t}\n\t\tSystem.out.println(1000 - n);\n\t\t\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\twhile(n > 1000) {\n\t\t\tn -= 1000;\n\t\t}\n\t\tSystem.out.println(1000 - n);\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\twhile(n > 1000) {\n\t\t\tn -= 1000;\n\t\t}\n\t\tSystem.out.println(1000 - n);\n\t\t\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\twhile(n > 1000) {\n\t\t\tn -= 1000;\n\t\t}\n\t\tSystem.out.println(1000 - n);\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while(n > 1000) {\n\t\t\tn -= 1000;\n\t\t}",
"n > 1000",
"n",
"1000",
"{\n\t\t\tn -= 1000;\n\t\t}",
"n -= 1000",
"n",
"1000",
"System.out.println(1000 - n)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - n",
"1000",
"n",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\twhile(n > 1000) {\n\t\t\tn -= 1000;\n\t\t}\n\t\tSystem.out.println(1000 - n);\n\t\t\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\twhile(n > 1000) {\n\t\t\tn -= 1000;\n\t\t}\n\t\tSystem.out.println(1000 - n);\n\t\t\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n > 1000) {
n -= 1000;
}
System.out.println(1000 - n);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
2,
2,
13,
17,
17,
17,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
37,
5
],
[
37,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
22,
28
],
[
22,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
6,
34
],
[
34,
35
],
[
0,
36
],
[
36,
37
],
[
36,
38
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000);\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000);\n }\n\n}",
"Main",
"public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000);\n }",
"main",
"{\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000);\n }",
"@SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"n % 1000 == 0 ? 0 : 1000 - n % 1000",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"0",
"1000 - n % 1000",
"1000",
"n % 1000",
"n",
"1000",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000);\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000);\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(n % 1000 == 0 ? 0 : 1000 - n % 1000);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
2,
13,
17,
13,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
11,
42
],
[
42,
43
],
[
43,
44
],
[
11,
45
],
[
45,
46
],
[
46,
47
],
[
9,
48
],
[
48,
49
],
[
7,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
50,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
56,
69
],
[
69,
70
],
[
56,
71
],
[
71,
72
]
]
| [
"import java.util.*;\nimport java.io.*;\n\n\nclass Main {\n\n public static void main(String[] args) throws IOException\n {\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n int answer = (int)(Math.ceil(n/1000.0));\n out.println(answer*1000 - n);\n\n out.flush();\n out.close();\n\n }\n\n static class pair{\n long x1;\n long x2;\n\n public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }\n\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n\n public static void main(String[] args) throws IOException\n {\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n int answer = (int)(Math.ceil(n/1000.0));\n out.println(answer*1000 - n);\n\n out.flush();\n out.close();\n\n }\n\n static class pair{\n long x1;\n long x2;\n\n public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }\n\n }\n\n}",
"Main",
"public static void main(String[] args) throws IOException\n {\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n int answer = (int)(Math.ceil(n/1000.0));\n out.println(answer*1000 - n);\n\n out.flush();\n out.close();\n\n }",
"main",
"{\n PrintWriter out = new PrintWriter(System.out);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n int answer = (int)(Math.ceil(n/1000.0));\n out.println(answer*1000 - n);\n\n out.flush();\n out.close();\n\n }",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int answer = (int)(Math.ceil(n/1000.0));",
"answer",
"(int)(Math.ceil(n/1000.0))",
"Math.ceil",
"Math",
"n/1000.0",
"n",
"1000.0",
"out.println(answer*1000 - n)",
"out.println",
"out",
"answer*1000 - n",
"answer*1000",
"answer",
"1000",
"n",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class pair{\n long x1;\n long x2;\n\n public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }\n\n }",
"pair",
"long x1;",
"x1",
"long x2;",
"x2",
"public pair(long x1 , long x2)\n {\n this.x1 = x1;\n this.x2 = x2;\n }",
"pair",
"{\n this.x1 = x1;\n this.x2 = x2;\n }",
"this.x1 = x1",
"this.x1",
"this",
"this.x1",
"x1",
"this.x2 = x2",
"this.x2",
"this",
"this.x2",
"x2",
"long x1",
"x1",
"long x2",
"x2"
]
| import java.util.*;
import java.io.*;
class Main {
public static void main(String[] args) throws IOException
{
PrintWriter out = new PrintWriter(System.out);
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int answer = (int)(Math.ceil(n/1000.0));
out.println(answer*1000 - n);
out.flush();
out.close();
}
static class pair{
long x1;
long x2;
public pair(long x1 , long x2)
{
this.x1 = x1;
this.x2 = x2;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
12,
13,
30,
38,
5,
13,
30,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
92,
14
],
[
92,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
17,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
15,
39
],
[
39,
40
],
[
92,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
41,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
56,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
50,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
41,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
41,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n public static void main(String[] args) {\n MyScanner sc = new MyScanner();\n\n int n = sc.nextInt();\n int ans = (10000 - n) % 1000;\n System.out.println(ans);\n }\n\n static class MyScanner {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);\n StringTokenizer tokenizer;\n\n String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n public static void main(String[] args) {\n MyScanner sc = new MyScanner();\n\n int n = sc.nextInt();\n int ans = (10000 - n) % 1000;\n System.out.println(ans);\n }\n\n static class MyScanner {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);\n StringTokenizer tokenizer;\n\n String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n MyScanner sc = new MyScanner();\n\n int n = sc.nextInt();\n int ans = (10000 - n) % 1000;\n System.out.println(ans);\n }",
"main",
"{\n MyScanner sc = new MyScanner();\n\n int n = sc.nextInt();\n int ans = (10000 - n) % 1000;\n System.out.println(ans);\n }",
"MyScanner sc = new MyScanner();",
"sc",
"new MyScanner()",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = (10000 - n) % 1000;",
"ans",
"(10000 - n) % 1000",
"(10000 - n)",
"10000",
"n",
"1000",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"static class MyScanner {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);\n StringTokenizer tokenizer;\n\n String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n }",
"MyScanner",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);",
"reader",
"new BufferedReader(new InputStreamReader(System.in), 1 << 15)",
"StringTokenizer tokenizer;",
"tokenizer",
"String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }",
"try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }",
"catch (IOException ignored) {\n }",
"IOException ignored",
"{\n }",
"{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n }",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public class Main {\n public static void main(String[] args) {\n MyScanner sc = new MyScanner();\n\n int n = sc.nextInt();\n int ans = (10000 - n) % 1000;\n System.out.println(ans);\n }\n\n static class MyScanner {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);\n StringTokenizer tokenizer;\n\n String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n MyScanner sc = new MyScanner();\n\n int n = sc.nextInt();\n int ans = (10000 - n) % 1000;\n System.out.println(ans);\n }\n\n static class MyScanner {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);\n StringTokenizer tokenizer;\n\n String next() {\n try {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(reader.readLine());\n }\n } catch (IOException ignored) {\n }\n return tokenizer.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
MyScanner sc = new MyScanner();
int n = sc.nextInt();
int ans = (10000 - n) % 1000;
System.out.println(ans);
}
static class MyScanner {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);
StringTokenizer tokenizer;
String next() {
try {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
tokenizer = new StringTokenizer(reader.readLine());
}
} catch (IOException ignored) {
}
return tokenizer.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
13,
30,
0,
13,
2,
13,
17,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
44,
5
],
[
44,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
6,
41
],
[
41,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
]
]
| [
" import java.util.Scanner;\n public class Main{\n \tpublic static void main(String[] args) {\n \t\t// TODO 自動生成されたメソッド・スタブ\n \t\tScanner sc = new Scanner(System.in);\n \t\tint N = sc.nextInt();\n \t\tint c = 0;\n \t\twhile(N > c) {\n \t\t\tc = c + 1000;\n \t\t}\n \t\t\tc= c-N;\n \t\tSystem.out.println(c);\n \t}\n \n }",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n \tpublic static void main(String[] args) {\n \t\t// TODO 自動生成されたメソッド・スタブ\n \t\tScanner sc = new Scanner(System.in);\n \t\tint N = sc.nextInt();\n \t\tint c = 0;\n \t\twhile(N > c) {\n \t\t\tc = c + 1000;\n \t\t}\n \t\t\tc= c-N;\n \t\tSystem.out.println(c);\n \t}\n \n }",
"Main",
"public static void main(String[] args) {\n \t\t// TODO 自動生成されたメソッド・スタブ\n \t\tScanner sc = new Scanner(System.in);\n \t\tint N = sc.nextInt();\n \t\tint c = 0;\n \t\twhile(N > c) {\n \t\t\tc = c + 1000;\n \t\t}\n \t\t\tc= c-N;\n \t\tSystem.out.println(c);\n \t}",
"main",
"{\n \t\t// TODO 自動生成されたメソッド・スタブ\n \t\tScanner sc = new Scanner(System.in);\n \t\tint N = sc.nextInt();\n \t\tint c = 0;\n \t\twhile(N > c) {\n \t\t\tc = c + 1000;\n \t\t}\n \t\t\tc= c-N;\n \t\tSystem.out.println(c);\n \t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = 0;",
"c",
"0",
"while(N > c) {\n \t\t\tc = c + 1000;\n \t\t}",
"N > c",
"N",
"c",
"{\n \t\t\tc = c + 1000;\n \t\t}",
"c = c + 1000",
"c",
"c + 1000",
"c",
"1000",
"c= c-N",
"c",
"c-N",
"c",
"N",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main{\n \tpublic static void main(String[] args) {\n \t\t// TODO 自動生成されたメソッド・スタブ\n \t\tScanner sc = new Scanner(System.in);\n \t\tint N = sc.nextInt();\n \t\tint c = 0;\n \t\twhile(N > c) {\n \t\t\tc = c + 1000;\n \t\t}\n \t\t\tc= c-N;\n \t\tSystem.out.println(c);\n \t}\n \n }",
"public class Main{\n \tpublic static void main(String[] args) {\n \t\t// TODO 自動生成されたメソッド・スタブ\n \t\tScanner sc = new Scanner(System.in);\n \t\tint N = sc.nextInt();\n \t\tint c = 0;\n \t\twhile(N > c) {\n \t\t\tc = c + 1000;\n \t\t}\n \t\t\tc= c-N;\n \t\tSystem.out.println(c);\n \t}\n \n }",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int c = 0;
while(N > c) {
c = c + 1000;
}
c= c-N;
System.out.println(c);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
2,
17,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
38,
5
],
[
38,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
6,
35
],
[
35,
36
],
[
0,
37
],
[
37,
38
],
[
37,
39
]
]
| [
"import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint q = (int)Math.ceil(n/1000.0);\n\t\tSystem.out.println(1000*q-n);\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint q = (int)Math.ceil(n/1000.0);\n\t\tSystem.out.println(1000*q-n);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint q = (int)Math.ceil(n/1000.0);\n\t\tSystem.out.println(1000*q-n);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint q = (int)Math.ceil(n/1000.0);\n\t\tSystem.out.println(1000*q-n);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int q = (int)Math.ceil(n/1000.0);",
"q",
"(int)Math.ceil(n/1000.0)",
"Math.ceil",
"Math",
"n/1000.0",
"n",
"1000.0",
"System.out.println(1000*q-n)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000*q-n",
"1000*q",
"1000",
"q",
"n",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint q = (int)Math.ceil(n/1000.0);\n\t\tSystem.out.println(1000*q-n);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint n = scan.nextInt();\n\t\tint q = (int)Math.ceil(n/1000.0);\n\t\tSystem.out.println(1000*q-n);\n\t}\n\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int q = (int)Math.ceil(n/1000.0);
System.out.println(1000*q-n);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
17,
2,
13,
17,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
145,
20
],
[
145,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
32,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
21,
54
],
[
54,
55
],
[
145,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
56,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
56,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
71,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
81,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
70,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
56,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
103,
104
],
[
56,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
56,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
121,
122
],
[
56,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
129,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
125,
142
],
[
142,
143
],
[
0,
144
],
[
144,
145
],
[
144,
146
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader; \nimport java.util.Scanner; \nimport java.util.StringTokenizer; \nimport java.util.*;\npublic class Main\n{ \nstatic class FastReader \t\n{\t\t\nBufferedReader br; \t\t\nStringTokenizer st; \t\t\npublic FastReader() \t\t\n{ \t\t\t\nbr = new BufferedReader(new\tInputStreamReader(System.in)); \t\t\n} \t\t\nString next() \t\t\n{ \t\t\t\nwhile (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n} \t\t\t\nreturn st.nextToken(); \t\t\n} \n\t\t\nint nextInt() \t\t\n{ \t\t\t\nreturn Integer.parseInt(next()); \t\t\n} \n\t\t\nlong nextLong() \t\t\n{ \t\t\t\nreturn Long.parseLong(next()); \t\t\n} \n\t\t\ndouble nextDouble() \t\t\n{ \t\t\t\nreturn Double.parseDouble(next()); \t\t\n\t\t } \n\t\t\n\t\tString nextLine() \t\t\n\t\t { \t\t\t\nString str = \"\"; \t\t\t\n\t\t\t try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t return str; \t\t\n\t\t } \t\n\t }\n\t\n\t public static void main(String[] args){\n\t\t FastReader scan=new FastReader();\n\t\t int t = scan.nextInt();\n\t\t if(t%1000 == 0)System.out.println(0);\n\t\t else System.out.println(1000 - t%1000);\n\t} \n} ",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{ \nstatic class FastReader \t\n{\t\t\nBufferedReader br; \t\t\nStringTokenizer st; \t\t\npublic FastReader() \t\t\n{ \t\t\t\nbr = new BufferedReader(new\tInputStreamReader(System.in)); \t\t\n} \t\t\nString next() \t\t\n{ \t\t\t\nwhile (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n} \t\t\t\nreturn st.nextToken(); \t\t\n} \n\t\t\nint nextInt() \t\t\n{ \t\t\t\nreturn Integer.parseInt(next()); \t\t\n} \n\t\t\nlong nextLong() \t\t\n{ \t\t\t\nreturn Long.parseLong(next()); \t\t\n} \n\t\t\ndouble nextDouble() \t\t\n{ \t\t\t\nreturn Double.parseDouble(next()); \t\t\n\t\t } \n\t\t\n\t\tString nextLine() \t\t\n\t\t { \t\t\t\nString str = \"\"; \t\t\t\n\t\t\t try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t return str; \t\t\n\t\t } \t\n\t }\n\t\n\t public static void main(String[] args){\n\t\t FastReader scan=new FastReader();\n\t\t int t = scan.nextInt();\n\t\t if(t%1000 == 0)System.out.println(0);\n\t\t else System.out.println(1000 - t%1000);\n\t} \n}",
"Main",
"public static void main(String[] args){\n\t\t FastReader scan=new FastReader();\n\t\t int t = scan.nextInt();\n\t\t if(t%1000 == 0)System.out.println(0);\n\t\t else System.out.println(1000 - t%1000);\n\t}",
"main",
"{\n\t\t FastReader scan=new FastReader();\n\t\t int t = scan.nextInt();\n\t\t if(t%1000 == 0)System.out.println(0);\n\t\t else System.out.println(1000 - t%1000);\n\t}",
"FastReader scan=new FastReader();",
"scan",
"new FastReader()",
"int t = scan.nextInt();",
"t",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(t%1000 == 0)System.out.println(0);\n\t\t else System.out.println(1000 - t%1000);",
"t%1000 == 0",
"t%1000",
"t",
"1000",
"0",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.out.println(1000 - t%1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - t%1000",
"1000",
"t%1000",
"t",
"1000",
"String[] args",
"args",
"static class FastReader \t\n{\t\t\nBufferedReader br; \t\t\nStringTokenizer st; \t\t\npublic FastReader() \t\t\n{ \t\t\t\nbr = new BufferedReader(new\tInputStreamReader(System.in)); \t\t\n} \t\t\nString next() \t\t\n{ \t\t\t\nwhile (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n} \t\t\t\nreturn st.nextToken(); \t\t\n} \n\t\t\nint nextInt() \t\t\n{ \t\t\t\nreturn Integer.parseInt(next()); \t\t\n} \n\t\t\nlong nextLong() \t\t\n{ \t\t\t\nreturn Long.parseLong(next()); \t\t\n} \n\t\t\ndouble nextDouble() \t\t\n{ \t\t\t\nreturn Double.parseDouble(next()); \t\t\n\t\t } \n\t\t\n\t\tString nextLine() \t\t\n\t\t { \t\t\t\nString str = \"\"; \t\t\t\n\t\t\t try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t return str; \t\t\n\t\t } \t\n\t }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() \t\t\n{ \t\t\t\nbr = new BufferedReader(new\tInputStreamReader(System.in)); \t\t\n}",
"FastReader",
"{ \t\t\t\nbr = new BufferedReader(new\tInputStreamReader(System.in)); \t\t\n}",
"br = new BufferedReader(new\tInputStreamReader(System.in))",
"br",
"new BufferedReader(new\tInputStreamReader(System.in))",
"String next() \t\t\n{ \t\t\t\nwhile (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n} \t\t\t\nreturn st.nextToken(); \t\t\n}",
"next",
"{ \t\t\t\nwhile (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n} \t\t\t\nreturn st.nextToken(); \t\t\n}",
"while (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n}",
"try\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n}",
"catch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n}",
"IOException e",
"{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() \t\t\n{ \t\t\t\nreturn Integer.parseInt(next()); \t\t\n}",
"nextInt",
"{ \t\t\t\nreturn Integer.parseInt(next()); \t\t\n}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() \t\t\n{ \t\t\t\nreturn Long.parseLong(next()); \t\t\n}",
"nextLong",
"{ \t\t\t\nreturn Long.parseLong(next()); \t\t\n}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() \t\t\n{ \t\t\t\nreturn Double.parseDouble(next()); \t\t\n\t\t }",
"nextDouble",
"{ \t\t\t\nreturn Double.parseDouble(next()); \t\t\n\t\t }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() \t\t\n\t\t { \t\t\t\nString str = \"\"; \t\t\t\n\t\t\t try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t return str; \t\t\n\t\t }",
"nextLine",
"{ \t\t\t\nString str = \"\"; \t\t\t\n\t\t\t try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t return str; \t\t\n\t\t }",
"String str = \"\";",
"str",
"\"\"",
"try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t }",
"catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t }",
"IOException e",
"{ \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{ \nstatic class FastReader \t\n{\t\t\nBufferedReader br; \t\t\nStringTokenizer st; \t\t\npublic FastReader() \t\t\n{ \t\t\t\nbr = new BufferedReader(new\tInputStreamReader(System.in)); \t\t\n} \t\t\nString next() \t\t\n{ \t\t\t\nwhile (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n} \t\t\t\nreturn st.nextToken(); \t\t\n} \n\t\t\nint nextInt() \t\t\n{ \t\t\t\nreturn Integer.parseInt(next()); \t\t\n} \n\t\t\nlong nextLong() \t\t\n{ \t\t\t\nreturn Long.parseLong(next()); \t\t\n} \n\t\t\ndouble nextDouble() \t\t\n{ \t\t\t\nreturn Double.parseDouble(next()); \t\t\n\t\t } \n\t\t\n\t\tString nextLine() \t\t\n\t\t { \t\t\t\nString str = \"\"; \t\t\t\n\t\t\t try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t return str; \t\t\n\t\t } \t\n\t }\n\t\n\t public static void main(String[] args){\n\t\t FastReader scan=new FastReader();\n\t\t int t = scan.nextInt();\n\t\t if(t%1000 == 0)System.out.println(0);\n\t\t else System.out.println(1000 - t%1000);\n\t} \n}",
"public class Main\n{ \nstatic class FastReader \t\n{\t\t\nBufferedReader br; \t\t\nStringTokenizer st; \t\t\npublic FastReader() \t\t\n{ \t\t\t\nbr = new BufferedReader(new\tInputStreamReader(System.in)); \t\t\n} \t\t\nString next() \t\t\n{ \t\t\t\nwhile (st == null || !st.hasMoreElements()) \t\t\t\n{ \t\t\t\t\ntry\t\t\t\t\n{ \t\t\t\t\t\nst = new StringTokenizer(br.readLine()); \t\t\t\t\n} \t\t\t\t\ncatch (IOException e) \t\t\t\t\n{ \t\t\t\t\t\ne.printStackTrace(); \t\t\t\t\n} \t\t\t\n} \t\t\t\nreturn st.nextToken(); \t\t\n} \n\t\t\nint nextInt() \t\t\n{ \t\t\t\nreturn Integer.parseInt(next()); \t\t\n} \n\t\t\nlong nextLong() \t\t\n{ \t\t\t\nreturn Long.parseLong(next()); \t\t\n} \n\t\t\ndouble nextDouble() \t\t\n{ \t\t\t\nreturn Double.parseDouble(next()); \t\t\n\t\t } \n\t\t\n\t\tString nextLine() \t\t\n\t\t { \t\t\t\nString str = \"\"; \t\t\t\n\t\t\t try\t\t\t\n\t\t\t{ \t\t\t\t\n\t\t\t\t str = br.readLine(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t catch (IOException e) \t\t\t\n\t\t\t { \t\t\t\t\n\t\t\t\t e.printStackTrace(); \t\t\t\n\t\t\t } \t\t\t\n\t\t\t return str; \t\t\n\t\t } \t\n\t }\n\t\n\t public static void main(String[] args){\n\t\t FastReader scan=new FastReader();\n\t\t int t = scan.nextInt();\n\t\t if(t%1000 == 0)System.out.println(0);\n\t\t else System.out.println(1000 - t%1000);\n\t} \n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.*;
public class Main
{
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(new InputStreamReader(System.in));
}
String next()
{
while (st == null || !st.hasMoreElements())
{
try
{
st = new StringTokenizer(br.readLine());
}
catch (IOException e)
{
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt()
{
return Integer.parseInt(next());
}
long nextLong()
{
return Long.parseLong(next());
}
double nextDouble()
{
return Double.parseDouble(next());
}
String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
public static void main(String[] args){
FastReader scan=new FastReader();
int t = scan.nextInt();
if(t%1000 == 0)System.out.println(0);
else System.out.println(1000 - t%1000);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
33,
5
],
[
33,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
6,
30
],
[
30,
31
],
[
0,
32
],
[
32,
33
],
[
32,
34
]
]
| [
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc= new Scanner(System.in);\n int X = sc.nextInt();\n int ans = (10000 - X) % 1000;\n System.out.println(ans);\n } \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc= new Scanner(System.in);\n int X = sc.nextInt();\n int ans = (10000 - X) % 1000;\n System.out.println(ans);\n } \n}",
"Main",
"public static void main(String[] args) {\n Scanner sc= new Scanner(System.in);\n int X = sc.nextInt();\n int ans = (10000 - X) % 1000;\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc= new Scanner(System.in);\n int X = sc.nextInt();\n int ans = (10000 - X) % 1000;\n System.out.println(ans);\n }",
"Scanner sc= new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int X = sc.nextInt();",
"X",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = (10000 - X) % 1000;",
"ans",
"(10000 - X) % 1000",
"(10000 - X)",
"10000",
"X",
"1000",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc= new Scanner(System.in);\n int X = sc.nextInt();\n int ans = (10000 - X) % 1000;\n System.out.println(ans);\n } \n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc= new Scanner(System.in);\n int X = sc.nextInt();\n int ans = (10000 - X) % 1000;\n System.out.println(ans);\n } \n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
int X = sc.nextInt();
int ans = (10000 - X) % 1000;
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
17,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
43,
8
],
[
43,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
9,
40
],
[
40,
41
],
[
0,
42
],
[
42,
43
],
[
42,
44
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\tint a = Integer.parseInt(reader.readLine());\n\tint res =1000* ((a+999)/1000);\n\tSystem.out.println((res-a));\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\tint a = Integer.parseInt(reader.readLine());\n\tint res =1000* ((a+999)/1000);\n\tSystem.out.println((res-a));\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\tint a = Integer.parseInt(reader.readLine());\n\tint res =1000* ((a+999)/1000);\n\tSystem.out.println((res-a));\n\t}",
"main",
"{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\tint a = Integer.parseInt(reader.readLine());\n\tint res =1000* ((a+999)/1000);\n\tSystem.out.println((res-a));\n\t}",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"int a = Integer.parseInt(reader.readLine());",
"a",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"int res =1000* ((a+999)/1000);",
"res",
"1000* ((a+999)/1000)",
"1000",
"((a+999)/1000)",
"(a+999)",
"a",
"999",
"1000",
"System.out.println((res-a))",
"System.out.println",
"System.out",
"System",
"System.out",
"(res-a)",
"res",
"a",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\tint a = Integer.parseInt(reader.readLine());\n\tint res =1000* ((a+999)/1000);\n\tSystem.out.println((res-a));\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\tint a = Integer.parseInt(reader.readLine());\n\tint res =1000* ((a+999)/1000);\n\tSystem.out.println((res-a));\n\t}\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int res =1000* ((a+999)/1000);
System.out.println((res-a));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
17,
2,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
32,
5
],
[
32,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
22,
28
],
[
6,
29
],
[
29,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
]
]
| [
"import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tSystem.out.println((1000 - n % 1000) % 1000 );\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tSystem.out.println((1000 - n % 1000) % 1000 );\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tSystem.out.println((1000 - n % 1000) % 1000 );\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tSystem.out.println((1000 - n % 1000) % 1000 );\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println((1000 - n % 1000) % 1000 )",
"System.out.println",
"System.out",
"System",
"System.out",
"(1000 - n % 1000) % 1000",
"(1000 - n % 1000)",
"1000",
"n % 1000",
"n",
"1000",
"1000",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tSystem.out.println((1000 - n % 1000) % 1000 );\n }\n}",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tSystem.out.println((1000 - n % 1000) % 1000 );\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println((1000 - n % 1000) % 1000 );
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
2,
17,
2,
13,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
71,
11
],
[
71,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
18,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
25,
34
],
[
34,
35
],
[
35,
36
],
[
25,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
25,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
42,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
42,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
61,
67
],
[
12,
68
],
[
68,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"main",
"{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"try {\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n }",
"int price = Integer.parseInt(reader.readLine());",
"price",
"Integer.parseInt(reader.readLine())",
"Integer.parseInt",
"Integer",
"reader.readLine()",
"reader.readLine",
"reader",
"reader.close()",
"reader.close",
"reader",
"int num1000 = price / 1000;",
"num1000",
"price / 1000",
"price",
"1000",
"if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }",
"price % 1000 == 0",
"price % 1000",
"price",
"1000",
"0",
"{\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n }",
"System.out.println(\"0\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"0\"",
"{\n System.out.println(1000 * (num1000 + 1) - price);\n }",
"System.out.println(1000 * (num1000 + 1) - price)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 * (num1000 + 1) - price",
"1000 * (num1000 + 1)",
"1000",
"(num1000 + 1)",
"num1000",
"1",
"price",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n int price = Integer.parseInt(reader.readLine());\n reader.close();\n int num1000 = price / 1000; // 必要な1000円の枚数-1\n if (price % 1000 == 0) {\n // 価格が1000円で割り切れるときはお釣り0\n System.out.println(\"0\");\n } else {\n System.out.println(1000 * (num1000 + 1) - price);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
int price = Integer.parseInt(reader.readLine());
reader.close();
int num1000 = price / 1000; // 必要な1000円の枚数-1
if (price % 1000 == 0) {
// 価格が1000円で割り切れるときはお釣り0
System.out.println("0");
} else {
System.out.println(1000 * (num1000 + 1) - price);
}
} catch (IOException e) {
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
0,
13,
2,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
52,
11
],
[
52,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
31,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
12,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint ans = 0;\n\t\tans = n % 1000;\n\t\tif (ans == 0)\n\t\t\tSystem.out.println(0);\n\t\telse\n\t\t\tSystem.out.println(1000 - ans);\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint ans = 0;\n\t\tans = n % 1000;\n\t\tif (ans == 0)\n\t\t\tSystem.out.println(0);\n\t\telse\n\t\t\tSystem.out.println(1000 - ans);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint ans = 0;\n\t\tans = n % 1000;\n\t\tif (ans == 0)\n\t\t\tSystem.out.println(0);\n\t\telse\n\t\t\tSystem.out.println(1000 - ans);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint ans = 0;\n\t\tans = n % 1000;\n\t\tif (ans == 0)\n\t\t\tSystem.out.println(0);\n\t\telse\n\t\t\tSystem.out.println(1000 - ans);\n\t}",
"Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));",
"in",
"new Scanner(new BufferedReader(new InputStreamReader(System.in)))",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int ans = 0;",
"ans",
"0",
"ans = n % 1000",
"ans",
"n % 1000",
"n",
"1000",
"if (ans == 0)\n\t\t\tSystem.out.println(0);\n\t\telse\n\t\t\tSystem.out.println(1000 - ans);",
"ans == 0",
"ans",
"0",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.out.println(1000 - ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - ans",
"1000",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint ans = 0;\n\t\tans = n % 1000;\n\t\tif (ans == 0)\n\t\t\tSystem.out.println(0);\n\t\telse\n\t\t\tSystem.out.println(1000 - ans);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tint ans = 0;\n\t\tans = n % 1000;\n\t\tif (ans == 0)\n\t\t\tSystem.out.println(0);\n\t\telse\n\t\t\tSystem.out.println(1000 - ans);\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
int n = in.nextInt();
int ans = 0;
ans = n % 1000;
if (ans == 0)
System.out.println(0);
else
System.out.println(1000 - ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
2,
2,
13,
17,
17,
17,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
46,
11
],
[
46,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
31,
37
],
[
31,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
12,
43
],
[
43,
44
],
[
0,
45
],
[
45,
46
],
[
45,
47
]
]
| [
"import java.util.*;\nimport java.lang.*;\nimport java.io.*;\npublic class Main {\n\n\tpublic static void main(String[] args)throws java.lang.Exception\n {\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n =Integer.parseInt(br.readLine());\n\t\tSystem.out.println(n%1000==0?0:1000-n%1000);\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args)throws java.lang.Exception\n {\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n =Integer.parseInt(br.readLine());\n\t\tSystem.out.println(n%1000==0?0:1000-n%1000);\n\t}\n\n}",
"Main",
"public static void main(String[] args)throws java.lang.Exception\n {\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n =Integer.parseInt(br.readLine());\n\t\tSystem.out.println(n%1000==0?0:1000-n%1000);\n\t}",
"main",
"{\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n =Integer.parseInt(br.readLine());\n\t\tSystem.out.println(n%1000==0?0:1000-n%1000);\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n =Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"System.out.println(n%1000==0?0:1000-n%1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"n%1000==0?0:1000-n%1000",
"n%1000==0",
"n%1000",
"n",
"1000",
"0",
"0",
"1000-n%1000",
"1000",
"n%1000",
"n",
"1000",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args)throws java.lang.Exception\n {\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n =Integer.parseInt(br.readLine());\n\t\tSystem.out.println(n%1000==0?0:1000-n%1000);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args)throws java.lang.Exception\n {\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n =Integer.parseInt(br.readLine());\n\t\tSystem.out.println(n%1000==0?0:1000-n%1000);\n\t}\n\n}",
"Main"
]
| import java.util.*;
import java.lang.*;
import java.io.*;
public class Main {
public static void main(String[] args)throws java.lang.Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n =Integer.parseInt(br.readLine());
System.out.println(n%1000==0?0:1000-n%1000);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
17,
2,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
32,
5
],
[
32,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
22,
28
],
[
6,
29
],
[
29,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args)\n {\n Scanner scanner = new Scanner(System.in);\n int x = scanner.nextInt();\n System.out.println((1000-(x%1000))%1000);\n\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args)\n {\n Scanner scanner = new Scanner(System.in);\n int x = scanner.nextInt();\n System.out.println((1000-(x%1000))%1000);\n\n }\n\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner scanner = new Scanner(System.in);\n int x = scanner.nextInt();\n System.out.println((1000-(x%1000))%1000);\n\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int x = scanner.nextInt();\n System.out.println((1000-(x%1000))%1000);\n\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int x = scanner.nextInt();",
"x",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"System.out.println((1000-(x%1000))%1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"(1000-(x%1000))%1000",
"(1000-(x%1000))",
"1000",
"(x%1000)",
"x",
"1000",
"1000",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args)\n {\n Scanner scanner = new Scanner(System.in);\n int x = scanner.nextInt();\n System.out.println((1000-(x%1000))%1000);\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args)\n {\n Scanner scanner = new Scanner(System.in);\n int x = scanner.nextInt();\n System.out.println((1000-(x%1000))%1000);\n\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
int x = scanner.nextInt();
System.out.println((1000-(x%1000))%1000);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
48,
5
],
[
48,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
22,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
6,
45
],
[
45,
46
],
[
0,
47
],
[
47,
48
],
[
47,
49
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner in = new java.util.Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint m = n%1000;\n\t\tif(m == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}else {\n\t\t\tSystem.out.println(1000 - m);\n\t\t}\n\t\t\n\t\t\n\t\tin.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner in = new java.util.Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint m = n%1000;\n\t\tif(m == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}else {\n\t\t\tSystem.out.println(1000 - m);\n\t\t}\n\t\t\n\t\t\n\t\tin.close();\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\t\n\t\tScanner in = new java.util.Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint m = n%1000;\n\t\tif(m == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}else {\n\t\t\tSystem.out.println(1000 - m);\n\t\t}\n\t\t\n\t\t\n\t\tin.close();\n\t}",
"main",
"{\n\t\t\n\t\tScanner in = new java.util.Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint m = n%1000;\n\t\tif(m == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}else {\n\t\t\tSystem.out.println(1000 - m);\n\t\t}\n\t\t\n\t\t\n\t\tin.close();\n\t}",
"Scanner in = new java.util.Scanner(System.in);",
"in",
"new java.util.Scanner(System.in)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int m = n%1000;",
"m",
"n%1000",
"n",
"1000",
"if(m == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}else {\n\t\t\tSystem.out.println(1000 - m);\n\t\t}",
"m == 0",
"m",
"0",
"{\n\t\t\tSystem.out.println(0);\n\t\t}",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n\t\t\tSystem.out.println(1000 - m);\n\t\t}",
"System.out.println(1000 - m)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - m",
"1000",
"m",
"in.close()",
"in.close",
"in",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner in = new java.util.Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint m = n%1000;\n\t\tif(m == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}else {\n\t\t\tSystem.out.println(1000 - m);\n\t\t}\n\t\t\n\t\t\n\t\tin.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner in = new java.util.Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint m = n%1000;\n\t\tif(m == 0) {\n\t\t\tSystem.out.println(0);\n\t\t}else {\n\t\t\tSystem.out.println(1000 - m);\n\t\t}\n\t\t\n\t\t\n\t\tin.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner in = new java.util.Scanner(System.in);
int n = in.nextInt();
int m = n%1000;
if(m == 0) {
System.out.println(0);
}else {
System.out.println(1000 - m);
}
in.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
0,
13,
2,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
50,
5
],
[
50,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
6,
47
],
[
47,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n // 整数の入力\n // final int a = sc.nextInt();\n // 文字列の入力\n // final String s1 = sc.next();\n final int varN = Integer.parseInt(sc.next());\n sc.close();\n\n int result = 0;\n result = 1000 - (varN % 1000);\n if (result == 1000) {\n result = 0;\n }\n System.out.println(result);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n // 整数の入力\n // final int a = sc.nextInt();\n // 文字列の入力\n // final String s1 = sc.next();\n final int varN = Integer.parseInt(sc.next());\n sc.close();\n\n int result = 0;\n result = 1000 - (varN % 1000);\n if (result == 1000) {\n result = 0;\n }\n System.out.println(result);\n }\n}",
"Main",
"public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n // 整数の入力\n // final int a = sc.nextInt();\n // 文字列の入力\n // final String s1 = sc.next();\n final int varN = Integer.parseInt(sc.next());\n sc.close();\n\n int result = 0;\n result = 1000 - (varN % 1000);\n if (result == 1000) {\n result = 0;\n }\n System.out.println(result);\n }",
"main",
"{\n final Scanner sc = new Scanner(System.in);\n // 整数の入力\n // final int a = sc.nextInt();\n // 文字列の入力\n // final String s1 = sc.next();\n final int varN = Integer.parseInt(sc.next());\n sc.close();\n\n int result = 0;\n result = 1000 - (varN % 1000);\n if (result == 1000) {\n result = 0;\n }\n System.out.println(result);\n }",
"final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final int varN = Integer.parseInt(sc.next());",
"varN",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"sc.close()",
"sc.close",
"sc",
"int result = 0;",
"result",
"0",
"result = 1000 - (varN % 1000)",
"result",
"1000 - (varN % 1000)",
"1000",
"(varN % 1000)",
"varN",
"1000",
"if (result == 1000) {\n result = 0;\n }",
"result == 1000",
"result",
"1000",
"{\n result = 0;\n }",
"result = 0",
"result",
"0",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"final String[] args",
"args",
"public class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n // 整数の入力\n // final int a = sc.nextInt();\n // 文字列の入力\n // final String s1 = sc.next();\n final int varN = Integer.parseInt(sc.next());\n sc.close();\n\n int result = 0;\n result = 1000 - (varN % 1000);\n if (result == 1000) {\n result = 0;\n }\n System.out.println(result);\n }\n}",
"public class Main {\n public static void main(final String[] args) {\n final Scanner sc = new Scanner(System.in);\n // 整数の入力\n // final int a = sc.nextInt();\n // 文字列の入力\n // final String s1 = sc.next();\n final int varN = Integer.parseInt(sc.next());\n sc.close();\n\n int result = 0;\n result = 1000 - (varN % 1000);\n if (result == 1000) {\n result = 0;\n }\n System.out.println(result);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(final String[] args) {
final Scanner sc = new Scanner(System.in);
// 整数の入力
// final int a = sc.nextInt();
// 文字列の入力
// final String s1 = sc.next();
final int varN = Integer.parseInt(sc.next());
sc.close();
int result = 0;
result = 1000 - (varN % 1000);
if (result == 1000) {
result = 0;
}
System.out.println(result);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
17,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
33,
5
],
[
33,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
6,
30
],
[
30,
31
],
[
0,
32
],
[
32,
33
],
[
32,
34
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n System.out.println((10000-n)%1000);\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n System.out.println((10000-n)%1000);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n System.out.println((10000-n)%1000);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n System.out.println((10000-n)%1000);\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println((10000-n)%1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"(10000-n)%1000",
"(10000-n)",
"10000",
"n",
"1000",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n System.out.println((10000-n)%1000);\n sc.close();\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n System.out.println((10000-n)%1000);\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println((10000-n)%1000);
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
17,
13,
14,
2,
13,
17,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
40,
5
],
[
40,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
6,
37
],
[
37,
38
],
[
0,
39
],
[
39,
40
],
[
39,
41
]
]
| [
"// 2回目の提出\n// 1回目の提出は、 n = 200 とか 1000 の 約数が n として入力された時に 0 を出力する為ng\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n // 準備\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n // 解く\n int ans = 10_000 - n;\n\n if(ans!=0)\n ans = ans % 1000;\n\n System.out.println(ans);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n // 準備\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n // 解く\n int ans = 10_000 - n;\n\n if(ans!=0)\n ans = ans % 1000;\n\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n // 準備\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n // 解く\n int ans = 10_000 - n;\n\n if(ans!=0)\n ans = ans % 1000;\n\n System.out.println(ans);\n }",
"main",
"{\n // 準備\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n // 解く\n int ans = 10_000 - n;\n\n if(ans!=0)\n ans = ans % 1000;\n\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 10_000 - n;",
"ans",
"10_000 - n",
"10_000",
"n",
"if(ans!=0)\n ans = ans % 1000;",
"ans!=0",
"ans",
"0",
"ans = ans % 1000",
"ans",
"ans % 1000",
"ans",
"1000",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n // 準備\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n // 解く\n int ans = 10_000 - n;\n\n if(ans!=0)\n ans = ans % 1000;\n\n System.out.println(ans);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n // 準備\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n\n // 解く\n int ans = 10_000 - n;\n\n if(ans!=0)\n ans = ans % 1000;\n\n System.out.println(ans);\n }\n}",
"Main"
]
| // 2回目の提出
// 1回目の提出は、 n = 200 とか 1000 の 約数が n として入力された時に 0 を出力する為ng
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// 準備
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
// 解く
int ans = 10_000 - n;
if(ans!=0)
ans = ans % 1000;
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
2,
17,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
13,
42,
2,
13,
13,
30,
40,
13,
0,
13,
2,
17,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
13,
3,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
54,
63
],
[
6,
64
],
[
64,
65
]
]
| [
"\nimport java.util.Scanner;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a = 1;\n long p = 1000 * a;\n if(p>=n){\n System.out.println(p-n);\n }\n while(n > p){\n a++;\n p = 1000*a;\n if(p>=n){\n System.out.println(p-n);\n break;\n }\n \n }\n }\n}\n\n\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a = 1;\n long p = 1000 * a;\n if(p>=n){\n System.out.println(p-n);\n }\n while(n > p){\n a++;\n p = 1000*a;\n if(p>=n){\n System.out.println(p-n);\n break;\n }\n \n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a = 1;\n long p = 1000 * a;\n if(p>=n){\n System.out.println(p-n);\n }\n while(n > p){\n a++;\n p = 1000*a;\n if(p>=n){\n System.out.println(p-n);\n break;\n }\n \n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long a = 1;\n long p = 1000 * a;\n if(p>=n){\n System.out.println(p-n);\n }\n while(n > p){\n a++;\n p = 1000*a;\n if(p>=n){\n System.out.println(p-n);\n break;\n }\n \n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long a = 1;",
"a",
"1",
"long p = 1000 * a;",
"p",
"1000 * a",
"1000",
"a",
"if(p>=n){\n System.out.println(p-n);\n }",
"p>=n",
"p",
"n",
"{\n System.out.println(p-n);\n }",
"System.out.println(p-n)",
"System.out.println",
"System.out",
"System",
"System.out",
"p-n",
"p",
"n",
"while(n > p){\n a++;\n p = 1000*a;\n if(p>=n){\n System.out.println(p-n);\n break;\n }\n \n }",
"n > p",
"n",
"p",
"{\n a++;\n p = 1000*a;\n if(p>=n){\n System.out.println(p-n);\n break;\n }\n \n }",
"a++",
"a",
"p = 1000*a",
"p",
"1000*a",
"1000",
"a",
"if(p>=n){\n System.out.println(p-n);\n break;\n }",
"p>=n",
"p",
"n",
"{\n System.out.println(p-n);\n break;\n }",
"System.out.println(p-n)",
"System.out.println",
"System.out",
"System",
"System.out",
"p-n",
"p",
"n",
"break;",
"String[] args",
"args"
]
|
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long a = 1;
long p = 1000 * a;
if(p>=n){
System.out.println(p-n);
}
while(n > p){
a++;
p = 1000*a;
if(p>=n){
System.out.println(p-n);
break;
}
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
22,
24
],
[
11,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
9,
43
],
[
43,
44
],
[
7,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
45,
49
],
[
49,
50
],
[
45,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
45,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
60,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
70,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
59,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
45,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
45,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
45,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
45,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
118,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
114,
131
],
[
131,
132
]
]
| [
"import java.util.*;\nimport java.io.*;\n\nclass Main {\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int v = n % 1000;\n if (v == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000 - v);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int v = n % 1000;\n if (v == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000 - v);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int v = n % 1000;\n if (v == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000 - v);\n }",
"main",
"{\n FastReader sc = new FastReader();\n int n = sc.nextInt();\n int v = n % 1000;\n if (v == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000 - v);\n }",
"FastReader sc = new FastReader();",
"sc",
"new FastReader()",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int v = n % 1000;",
"v",
"n % 1000",
"n",
"1000",
"if (v == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000 - v);",
"v == 0",
"v",
"0",
"System.out.println(\"0\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"0\"",
"System.out.println(1000 - v)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000 - v",
"1000",
"v",
"String[] args",
"args",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str"
]
| import java.util.*;
import java.io.*;
class Main {
public static void main(String[] args) {
FastReader sc = new FastReader();
int n = sc.nextInt();
int v = n % 1000;
if (v == 0)
System.out.println("0");
else
System.out.println(1000 - v);
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
44,
5
],
[
44,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
6,
41
],
[
41,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int num = scan.nextInt();\n int change = num%1000;\n if(change!=0){\n change = 1000 - change;\n }\n System.out.println(change);\n scan.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int num = scan.nextInt();\n int change = num%1000;\n if(change!=0){\n change = 1000 - change;\n }\n System.out.println(change);\n scan.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int num = scan.nextInt();\n int change = num%1000;\n if(change!=0){\n change = 1000 - change;\n }\n System.out.println(change);\n scan.close();\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int num = scan.nextInt();\n int change = num%1000;\n if(change!=0){\n change = 1000 - change;\n }\n System.out.println(change);\n scan.close();\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int num = scan.nextInt();",
"num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int change = num%1000;",
"change",
"num%1000",
"num",
"1000",
"if(change!=0){\n change = 1000 - change;\n }",
"change!=0",
"change",
"0",
"{\n change = 1000 - change;\n }",
"change = 1000 - change",
"change",
"1000 - change",
"1000",
"change",
"System.out.println(change)",
"System.out.println",
"System.out",
"System",
"System.out",
"change",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int num = scan.nextInt();\n int change = num%1000;\n if(change!=0){\n change = 1000 - change;\n }\n System.out.println(change);\n scan.close();\n }\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int num = scan.nextInt();\n int change = num%1000;\n if(change!=0){\n change = 1000 - change;\n }\n System.out.println(change);\n scan.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int change = num%1000;
if(change!=0){
change = 1000 - change;
}
System.out.println(change);
scan.close();
}
} |
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
40,
17,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
5,
14
],
[
14,
15
],
[
14,
16
],
[
5,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
5,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
5,
41
],
[
41,
42
],
[
42,
43
],
[
3,
44
],
[
44,
45
]
]
| [
"class Main{\n\t\npublic static void main (String[] args) {\n\t\n\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\n\tint N = sc.nextInt();\n\tboolean flag = true;\n\t\n\twhile (flag) {\n\t\tN-=1000;\n\t\tif (N<=0) {\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}\n\t}\n\t\n\tSystem.out.println(N);\n\t\n\tsc.close();;\n\t\n}\n\t\n\t\n}\n",
"class Main{\n\t\npublic static void main (String[] args) {\n\t\n\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\n\tint N = sc.nextInt();\n\tboolean flag = true;\n\t\n\twhile (flag) {\n\t\tN-=1000;\n\t\tif (N<=0) {\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}\n\t}\n\t\n\tSystem.out.println(N);\n\t\n\tsc.close();;\n\t\n}\n\t\n\t\n}",
"Main",
"public static void main (String[] args) {\n\t\n\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\n\tint N = sc.nextInt();\n\tboolean flag = true;\n\t\n\twhile (flag) {\n\t\tN-=1000;\n\t\tif (N<=0) {\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}\n\t}\n\t\n\tSystem.out.println(N);\n\t\n\tsc.close();;\n\t\n}",
"main",
"{\n\t\n\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\n\tint N = sc.nextInt();\n\tboolean flag = true;\n\t\n\twhile (flag) {\n\t\tN-=1000;\n\t\tif (N<=0) {\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}\n\t}\n\t\n\tSystem.out.println(N);\n\t\n\tsc.close();;\n\t\n}",
"java.util.Scanner sc = new java.util.Scanner(System.in);",
"sc",
"new java.util.Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flag = true;",
"flag",
"true",
"while (flag) {\n\t\tN-=1000;\n\t\tif (N<=0) {\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}\n\t}",
"flag",
"{\n\t\tN-=1000;\n\t\tif (N<=0) {\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}\n\t}",
"N-=1000",
"N",
"1000",
"if (N<=0) {\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}",
"N<=0",
"N",
"0",
"{\n\t\t\tflag=false;\n\t\t\tN*=-1;\n\t\t}",
"flag=false",
"flag",
"false",
"N*=-1",
"N",
"-1",
"1",
"System.out.println(N)",
"System.out.println",
"System.out",
"System",
"System.out",
"N",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args"
]
| class Main{
public static void main (String[] args) {
java.util.Scanner sc = new java.util.Scanner(System.in);
int N = sc.nextInt();
boolean flag = true;
while (flag) {
N-=1000;
if (N<=0) {
flag=false;
N*=-1;
}
}
System.out.println(N);
sc.close();;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
22,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
6,
40
],
[
40,
41
]
]
| [
"import java.util.*;\nclass Main {\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int rem = n%1000;\n if(rem==0)\n System.out.println(rem);\n else\n System.out.println(1000-rem);\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int rem = n%1000;\n if(rem==0)\n System.out.println(rem);\n else\n System.out.println(1000-rem);\n \n }\n}",
"Main",
"public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int rem = n%1000;\n if(rem==0)\n System.out.println(rem);\n else\n System.out.println(1000-rem);\n \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int rem = n%1000;\n if(rem==0)\n System.out.println(rem);\n else\n System.out.println(1000-rem);\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int rem = n%1000;",
"rem",
"n%1000",
"n",
"1000",
"if(rem==0)\n System.out.println(rem);\n else\n System.out.println(1000-rem);",
"rem==0",
"rem",
"0",
"System.out.println(rem)",
"System.out.println",
"System.out",
"System",
"System.out",
"rem",
"System.out.println(1000-rem)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-rem",
"1000",
"rem",
"String args[]",
"args"
]
| import java.util.*;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int rem = n%1000;
if(rem==0)
System.out.println(rem);
else
System.out.println(1000-rem);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
14,
2,
13,
13,
30,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
102,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
32
],
[
32,
33
],
[
32,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
11,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
38,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
49,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
54,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
69,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
65,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
11,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
9,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
]
| [
"import java.util.Scanner;\n\n/**\n * コンソールテスト用Main クラス\n *\n */\npublic class Main {\n\n\t/* コンストラクタ */\n\tMain() {\n\t//何もしない\n\t}\n\n\t/**\n\t * 提出\n\t *\n\t */\n\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint sen = 1000;\n\t\tint otsuri = 0;\n\t\tint kisuu = 0;\n\t\tint shiharai = 0;\n\t\tint ichiman = 10000;\n\t\tint waru = 0;\n\n\t\tif (n <= sen) {\n\t\t\totsuri = sen - n;\n\t\t} else {\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(otsuri);\n\n\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\t/* コンストラクタ */\n\tMain() {\n\t//何もしない\n\t}\n\n\t/**\n\t * 提出\n\t *\n\t */\n\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint sen = 1000;\n\t\tint otsuri = 0;\n\t\tint kisuu = 0;\n\t\tint shiharai = 0;\n\t\tint ichiman = 10000;\n\t\tint waru = 0;\n\n\t\tif (n <= sen) {\n\t\t\totsuri = sen - n;\n\t\t} else {\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(otsuri);\n\n\n\n\t}\n}",
"Main",
"/* コンストラクタ */\n\tMain() {\n\t//何もしない\n\t}",
"Main",
"{\n\t//何もしない\n\t}",
"/**\n\t * 提出\n\t *\n\t */\n\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint sen = 1000;\n\t\tint otsuri = 0;\n\t\tint kisuu = 0;\n\t\tint shiharai = 0;\n\t\tint ichiman = 10000;\n\t\tint waru = 0;\n\n\t\tif (n <= sen) {\n\t\t\totsuri = sen - n;\n\t\t} else {\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(otsuri);\n\n\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint sen = 1000;\n\t\tint otsuri = 0;\n\t\tint kisuu = 0;\n\t\tint shiharai = 0;\n\t\tint ichiman = 10000;\n\t\tint waru = 0;\n\n\t\tif (n <= sen) {\n\t\t\totsuri = sen - n;\n\t\t} else {\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(otsuri);\n\n\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sen = 1000;",
"sen",
"1000",
"int otsuri = 0;",
"otsuri",
"0",
"int kisuu = 0;",
"kisuu",
"0",
"int shiharai = 0;",
"shiharai",
"0",
"int ichiman = 10000;",
"ichiman",
"10000",
"int waru = 0;",
"waru",
"0",
"if (n <= sen) {\n\t\t\totsuri = sen - n;\n\t\t} else {\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"n <= sen",
"n",
"sen",
"{\n\t\t\totsuri = sen - n;\n\t\t}",
"otsuri = sen - n",
"otsuri",
"sen - n",
"sen",
"n",
"{\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"if (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}",
"n == ichiman",
"n",
"ichiman",
"{\n\t\t\t\t//何もしない\n\n\t\t\t}",
"{\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}",
"waru = n % sen",
"waru",
"n % sen",
"n",
"sen",
"kisuu = n /sen",
"kisuu",
"n /sen",
"n",
"sen",
"if (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}",
"waru != 0",
"waru",
"0",
"{\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t}",
"shiharai = kisuu * sen + sen",
"shiharai",
"kisuu * sen + sen",
"kisuu * sen",
"kisuu",
"sen",
"sen",
"otsuri = shiharai - n",
"otsuri",
"shiharai - n",
"shiharai",
"n",
"{\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}",
"shiharai = kisuu * sen",
"shiharai",
"kisuu * sen",
"kisuu",
"sen",
"otsuri = shiharai - n",
"otsuri",
"shiharai - n",
"shiharai",
"n",
"System.out.println(otsuri)",
"System.out.println",
"System.out",
"System",
"System.out",
"otsuri",
"String args[]",
"args",
"public class Main {\n\n\t/* コンストラクタ */\n\tMain() {\n\t//何もしない\n\t}\n\n\t/**\n\t * 提出\n\t *\n\t */\n\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint sen = 1000;\n\t\tint otsuri = 0;\n\t\tint kisuu = 0;\n\t\tint shiharai = 0;\n\t\tint ichiman = 10000;\n\t\tint waru = 0;\n\n\t\tif (n <= sen) {\n\t\t\totsuri = sen - n;\n\t\t} else {\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(otsuri);\n\n\n\n\t}\n}",
"public class Main {\n\n\t/* コンストラクタ */\n\tMain() {\n\t//何もしない\n\t}\n\n\t/**\n\t * 提出\n\t *\n\t */\n\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint sen = 1000;\n\t\tint otsuri = 0;\n\t\tint kisuu = 0;\n\t\tint shiharai = 0;\n\t\tint ichiman = 10000;\n\t\tint waru = 0;\n\n\t\tif (n <= sen) {\n\t\t\totsuri = sen - n;\n\t\t} else {\n\t\t\tif (n == ichiman) {\n\t\t\t\t//何もしない\n\n\t\t\t} else {\n\t\t\t\twaru = n % sen;\n\t\t\t\tkisuu = n /sen;\n\t\t\t\tif (waru != 0) {\n\t\t\t\t\tshiharai = kisuu * sen + sen;\n\t\t\t\t\totsuri = shiharai - n;\n\t\t\t\t} else {\n\t\t\t\t\tshiharai = kisuu * sen ;\n\t\t\t\t\totsuri = shiharai - n;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(otsuri);\n\n\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
/**
* コンソールテスト用Main クラス
*
*/
public class Main {
/* コンストラクタ */
Main() {
//何もしない
}
/**
* 提出
*
*/
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int sen = 1000;
int otsuri = 0;
int kisuu = 0;
int shiharai = 0;
int ichiman = 10000;
int waru = 0;
if (n <= sen) {
otsuri = sen - n;
} else {
if (n == ichiman) {
//何もしない
} else {
waru = n % sen;
kisuu = n /sen;
if (waru != 0) {
shiharai = kisuu * sen + sen;
otsuri = shiharai - n;
} else {
shiharai = kisuu * sen ;
otsuri = shiharai - n;
}
}
}
System.out.println(otsuri);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
2,
2,
13,
17,
17,
2,
17,
2,
13,
17,
17,
4,
18,
13,
12,
13,
30,
4,
18,
20,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
22,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
4,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
]
]
| [
"import java.util.*;\n\nclass Main{\n void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n System.out.println(n % 1000 != 0 ? 1000 - n % 1000 : 0);\n scan.close();\n }\n \n public static void main(String[] args){\n new Main().solve();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n System.out.println(n % 1000 != 0 ? 1000 - n % 1000 : 0);\n scan.close();\n }\n \n public static void main(String[] args){\n new Main().solve();\n }\n}",
"Main",
"void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n System.out.println(n % 1000 != 0 ? 1000 - n % 1000 : 0);\n scan.close();\n }",
"solve",
"{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n System.out.println(n % 1000 != 0 ? 1000 - n % 1000 : 0);\n scan.close();\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"System.out.println(n % 1000 != 0 ? 1000 - n % 1000 : 0)",
"System.out.println",
"System.out",
"System",
"System.out",
"n % 1000 != 0 ? 1000 - n % 1000 : 0",
"n % 1000 != 0",
"n % 1000",
"n",
"1000",
"0",
"1000 - n % 1000",
"1000",
"n % 1000",
"n",
"1000",
"0",
"scan.close()",
"scan.close",
"scan",
"public static void main(String[] args){\n new Main().solve();\n }",
"main",
"{\n new Main().solve();\n }",
"new Main().solve()",
"new Main().solve",
"new Main()",
"String[] args",
"args"
]
| import java.util.*;
class Main{
void solve(){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
System.out.println(n % 1000 != 0 ? 1000 - n % 1000 : 0);
scan.close();
}
public static void main(String[] args){
new Main().solve();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
3,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
29,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
36,
47
],
[
6,
48
],
[
48,
49
]
]
| [
"import java.util.Scanner;\nclass Main{\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n for(int i=1;i<=10;i++)\n {\n if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }\n\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n for(int i=1;i<=10;i++)\n {\n if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }\n\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n for(int i=1;i<=10;i++)\n {\n if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }\n\n }\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n for(int i=1;i<=10;i++)\n {\n if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }\n\n }\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=1;i<=10;i++)\n {\n if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }\n\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=10",
"i",
"10",
"i++",
"i++",
"i",
"{\n if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }\n\n }",
"{\n if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }\n\n }",
"if(n<=i*1000)\n {\n System.out.println((i*1000)-n);\n break;\n }",
"n<=i*1000",
"n",
"i*1000",
"i",
"1000",
"{\n System.out.println((i*1000)-n);\n break;\n }",
"System.out.println((i*1000)-n)",
"System.out.println",
"System.out",
"System",
"System.out",
"(i*1000)-n",
"(i*1000)",
"i",
"1000",
"n",
"break;",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
for(int i=1;i<=10;i++)
{
if(n<=i*1000)
{
System.out.println((i*1000)-n);
break;
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
17,
41,
13,
2,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
41,
5
],
[
41,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
6,
38
],
[
38,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
]
]
| [
"import java.util.*;\n \npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n while(n > 1000){\n n = n - 1000;\n }\n int ans = 1000 - n;\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n while(n > 1000){\n n = n - 1000;\n }\n int ans = 1000 - n;\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n while(n > 1000){\n n = n - 1000;\n }\n int ans = 1000 - n;\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n while(n > 1000){\n n = n - 1000;\n }\n int ans = 1000 - n;\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while(n > 1000){\n n = n - 1000;\n }",
"n > 1000",
"n",
"1000",
"{\n n = n - 1000;\n }",
"n = n - 1000",
"n",
"n - 1000",
"n",
"1000",
"int ans = 1000 - n;",
"ans",
"1000 - n",
"1000",
"n",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n while(n > 1000){\n n = n - 1000;\n }\n int ans = 1000 - n;\n System.out.println(ans);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n \n while(n > 1000){\n n = n - 1000;\n }\n int ans = 1000 - n;\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n > 1000){
n = n - 1000;
}
int ans = 1000 - n;
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
29,
8,
2,
2,
13,
17,
17,
17,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
55,
11
],
[
55,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
12,
34
],
[
34,
35
],
[
55,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
40,
46
],
[
40,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
36,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int m = Integer.parseInt(br.readLine());\n System.out.println(problem173a(m));\n }\n\n private static int problem173a(int n) {\n return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int m = Integer.parseInt(br.readLine());\n System.out.println(problem173a(m));\n }\n\n private static int problem173a(int n) {\n return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int m = Integer.parseInt(br.readLine());\n System.out.println(problem173a(m));\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int m = Integer.parseInt(br.readLine());\n System.out.println(problem173a(m));\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int m = Integer.parseInt(br.readLine());",
"m",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"System.out.println(problem173a(m))",
"System.out.println",
"System.out",
"System",
"System.out",
"problem173a(m)",
"problem173a",
"m",
"String[] args",
"args",
"private static int problem173a(int n) {\n return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));\n }",
"problem173a",
"{\n return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));\n }",
"return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));",
"((n % 1000) == 0) ? 0 : (1000 - (n % 1000))",
"((n % 1000) == 0)",
"(n % 1000)",
"n",
"1000",
"0",
"0",
"(1000 - (n % 1000))",
"1000",
"(n % 1000)",
"n",
"1000",
"int n",
"n",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int m = Integer.parseInt(br.readLine());\n System.out.println(problem173a(m));\n }\n\n private static int problem173a(int n) {\n return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int m = Integer.parseInt(br.readLine());\n System.out.println(problem173a(m));\n }\n\n private static int problem173a(int n) {\n return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int m = Integer.parseInt(br.readLine());
System.out.println(problem173a(m));
}
private static int problem173a(int n) {
return ((n % 1000) == 0) ? 0 : (1000 - (n % 1000));
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
2,
13,
17,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
146,
29
],
[
146,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
32,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
41,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
30,
65
],
[
65,
66
],
[
146,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
78,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
83,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
77,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
67,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
67,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
114,
122
],
[
122,
123
],
[
123,
124
],
[
114,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
109,
132
],
[
132,
133
],
[
107,
134
],
[
134,
135
],
[
67,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
143,
144
],
[
0,
145
],
[
145,
146
],
[
145,
147
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\nimport java.lang.Math;\nimport java.util.Map;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.math.BigInteger;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n if (n%1000 == 0) {\n System.out.println(0);\n } else {\n System.out.println(1000-(n%1000));\n }\n\n\n\n\n }\n\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.*;",
"util.*",
"java",
"import java.lang.Math;",
"Math",
"java.lang",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n if (n%1000 == 0) {\n System.out.println(0);\n } else {\n System.out.println(1000-(n%1000));\n }\n\n\n\n\n }\n\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n if (n%1000 == 0) {\n System.out.println(0);\n } else {\n System.out.println(1000-(n%1000));\n }\n\n\n\n\n }",
"main",
"{\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n if (n%1000 == 0) {\n System.out.println(0);\n } else {\n System.out.println(1000-(n%1000));\n }\n\n\n\n\n }",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"int n = fs.nextInt();",
"n",
"fs.nextInt()",
"fs.nextInt",
"fs",
"if (n%1000 == 0) {\n System.out.println(0);\n } else {\n System.out.println(1000-(n%1000));\n }",
"n%1000 == 0",
"n%1000",
"n",
"1000",
"0",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n System.out.println(1000-(n%1000));\n }",
"System.out.println(1000-(n%1000))",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-(n%1000)",
"1000",
"(n%1000)",
"n",
"1000",
"String[] args",
"args",
"static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"next",
"{\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st=new StringTokenizer(br.readLine());\n }",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"readArray",
"{\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n if (n%1000 == 0) {\n System.out.println(0);\n } else {\n System.out.println(1000-(n%1000));\n }\n\n\n\n\n }\n\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n int n = fs.nextInt();\n if (n%1000 == 0) {\n System.out.println(0);\n } else {\n System.out.println(1000-(n%1000));\n }\n\n\n\n\n }\n\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.lang.Math;
import java.util.Map;
import java.util.ArrayList;
import java.util.Collections;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int n = fs.nextInt();
if (n%1000 == 0) {
System.out.println(0);
} else {
System.out.println(1000-(n%1000));
}
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String next() {
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
long nextLong() {
return Long.parseLong(next());
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
17,
42,
17,
30,
14,
2,
2,
13,
17,
17,
30,
40,
13,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
13,
17,
3,
14,
2,
2,
13,
17,
17,
30,
4,
18,
18,
13,
13,
2,
2,
40,
13,
17,
13,
3,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
74,
5
],
[
74,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
35,
36
],
[
35,
37
],
[
26,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
42,
51
],
[
38,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
64,
69
],
[
58,
70
],
[
6,
71
],
[
71,
72
],
[
0,
73
],
[
73,
74
],
[
73,
75
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n\n Scanner sc = new Scanner (System.in);\n \n int a = sc.nextInt();\n int b=a;\n int c =0;\n //6900\n while(true){\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }//while\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n\n Scanner sc = new Scanner (System.in);\n \n int a = sc.nextInt();\n int b=a;\n int c =0;\n //6900\n while(true){\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }//while\n \n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n // Your code here!\n\n Scanner sc = new Scanner (System.in);\n \n int a = sc.nextInt();\n int b=a;\n int c =0;\n //6900\n while(true){\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }//while\n \n }",
"main",
"{\n // Your code here!\n\n Scanner sc = new Scanner (System.in);\n \n int a = sc.nextInt();\n int b=a;\n int c =0;\n //6900\n while(true){\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }//while\n \n }",
"Scanner sc = new Scanner (System.in);",
"sc",
"new Scanner (System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b=a;",
"b",
"a",
"int c =0;",
"c",
"0",
"while(true){\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }//while",
"true",
"{\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }",
"if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif",
"a-1000>0",
"a-1000",
"a",
"1000",
"0",
"{\n c++;\n a-=1000;\n \n }",
"c++",
"c",
"a-=1000",
"a",
"1000",
"if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif",
"a==0",
"a",
"0",
"{\n System.out.println(c*1000);\n break;\n }",
"System.out.println(c*1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"c*1000",
"c",
"1000",
"break;",
"if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif",
"a-1000<=0",
"a-1000",
"a",
"1000",
"0",
"{\n \n System.out.println((((++c)*1000))-b);\n break;\n }",
"System.out.println((((++c)*1000))-b)",
"System.out.println",
"System.out",
"System",
"System.out",
"(((++c)*1000))-b",
"(((++c)*1000))",
"(++c)",
"c",
"1000",
"b",
"break;",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n\n Scanner sc = new Scanner (System.in);\n \n int a = sc.nextInt();\n int b=a;\n int c =0;\n //6900\n while(true){\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }//while\n \n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n\n Scanner sc = new Scanner (System.in);\n \n int a = sc.nextInt();\n int b=a;\n int c =0;\n //6900\n while(true){\n if(a-1000>0){\n c++;\n a-=1000;\n \n }else if (a==0){\n System.out.println(c*1000);\n break;\n }//elseif\n else if(a-1000<=0){\n \n System.out.println((((++c)*1000))-b);\n break;\n }//elseif\n }//while\n \n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner (System.in);
int a = sc.nextInt();
int b=a;
int c =0;
//6900
while(true){
if(a-1000>0){
c++;
a-=1000;
}else if (a==0){
System.out.println(c*1000);
break;
}//elseif
else if(a-1000<=0){
System.out.println((((++c)*1000))-b);
break;
}//elseif
}//while
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
18,
13,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
17,
13,
13,
30,
4,
18,
13,
2,
2,
17,
13,
13,
29,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
70,
11
],
[
70,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
17,
19
],
[
15,
20
],
[
20,
21
],
[
20,
22
],
[
12,
23
],
[
23,
24
],
[
70,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
27,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
49,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
55,
64
],
[
25,
65
],
[
65,
66
],
[
25,
67
],
[
67,
68
],
[
0,
69
],
[
69,
70
],
[
69,
71
]
]
| [
"\nimport java.io.InputStream;\nimport java.io.PrintStream;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n\n for(int i = 1; i <= 10; i++) {\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }\n }\n}",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintStream;",
"PrintStream",
"java.io",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n\n for(int i = 1; i <= 10; i++) {\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }",
"main",
"{\n solve(System.in, System.out);\n }",
"solve(System.in, System.out)",
"solve",
"System.in",
"System",
"System.in",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n\n for(int i = 1; i <= 10; i++) {\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }\n }",
"solve",
"{\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n\n for(int i = 1; i <= 10; i++) {\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }\n }",
"Scanner scan = new Scanner(is);",
"scan",
"new Scanner(is)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"for(int i = 1; i <= 10; i++) {\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= 10",
"i",
"10",
"i++",
"i++",
"i",
"{\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }",
"{\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }",
"if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }",
"1000 * i >= N",
"1000 * i",
"1000",
"i",
"N",
"{\n os.println(1000*i-N);\n return;\n }",
"os.println(1000*i-N)",
"os.println",
"os",
"1000*i-N",
"1000*i",
"1000",
"i",
"N",
"return;",
"InputStream is",
"is",
"PrintStream os",
"os",
"public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n\n for(int i = 1; i <= 10; i++) {\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n int N = scan.nextInt();\n\n for(int i = 1; i <= 10; i++) {\n if(1000 * i >= N){\n os.println(1000*i-N);\n return;\n }\n }\n }\n}",
"Main"
]
|
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
solve(System.in, System.out);
}
static void solve(InputStream is, PrintStream os) {
// Your code here!
Scanner scan = new Scanner(is);
int N = scan.nextInt();
for(int i = 1; i <= 10; i++) {
if(1000 * i >= N){
os.println(1000*i-N);
return;
}
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
2,
4,
18,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
12,
13,
30,
41,
13,
17,
0,
13,
2,
13,
13,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
13,
17,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
13,
13,
2,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
41,
13,
18,
13,
13,
41,
13,
2,
4,
13,
18,
13,
13,
13,
41,
13,
2,
4,
13,
18,
13,
2,
13,
13,
13,
29,
2,
2,
2,
2,
18,
13,
13,
13,
13,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
304,
11
],
[
304,
12
],
[
12,
13
],
[
12,
14
],
[
304,
15
],
[
15,
16
],
[
304,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
25,
29
],
[
19,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
30,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
17,
50
],
[
50,
51
],
[
304,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
54,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
68,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
67,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
67,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
54,
93
],
[
93,
94
],
[
52,
95
],
[
95,
96
],
[
52,
97
],
[
97,
98
],
[
304,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
99,
109
],
[
109,
110
],
[
304,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
113,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
113,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
127,
133
],
[
113,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
136,
144
],
[
113,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
148,
154
],
[
147,
155
],
[
146,
156
],
[
111,
157
],
[
157,
158
],
[
111,
159
],
[
159,
160
],
[
304,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
161,
165
],
[
165,
166
],
[
161,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
161,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
176,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
186,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
175,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
161,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
202,
205
],
[
205,
206
],
[
161,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
211,
214
],
[
214,
215
],
[
161,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
220,
223
],
[
223,
224
],
[
161,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
232,
237
],
[
237,
238
],
[
237,
239
],
[
232,
240
],
[
240,
241
],
[
241,
242
],
[
232,
243
],
[
244,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
245,
249
],
[
249,
250
],
[
227,
251
],
[
251,
252
],
[
225,
253
],
[
253,
254
],
[
161,
255
],
[
255,
256
],
[
255,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
262
],
[
262,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
262,
267
],
[
267,
268
],
[
267,
269
],
[
262,
270
],
[
270,
271
],
[
271,
272
],
[
262,
273
],
[
274,
274
],
[
274,
275
],
[
275,
276
],
[
276,
277
],
[
276,
278
],
[
275,
279
],
[
279,
280
],
[
257,
281
],
[
281,
282
],
[
255,
283
],
[
283,
284
],
[
161,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
291,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
299,
300
],
[
287,
301
],
[
301,
302
],
[
0,
303
],
[
303,
304
],
[
303,
305
]
]
| [
"//SHIVAM GARG\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n \n/*\n2\n2\n5 9\n7\n1 2 4 8 16 64 128\n*/\npublic class Main\n{\n \n \n\tpublic static void main (String[] args) throws java.lang.Exception {\n\t FastReader reader = new FastReader();\n\t int temp = reader.nextInt() % 1000;\n\t\tif(temp == 0){\n System.out.println(0);\n }else{\n System.out.println(1000-temp);\n }\n\n\t\t\t \n }\n \n \n \n /* Iterative Function to calculate (x^y)%p in O(log y) */\n \n public static long prime = 1000000007;\n public static long[] fact;\n static long power(long x, long y) \n { \n // Initialize result \n long res = 1; \n // Update x if it is more than or \n // equal to p \n x = x % prime; \n \n while (y > 0) \n { \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n } \n \n return res; \n } \n \n // Returns n^(-1) mod p \n static long modInverse(long n) \n { return power(n, prime-2); } \n \n // Returns nCr % p using Fermat's little theorem. \n static long nCrModPFermat(int n, int r) \n { \n // Base case \n if (r == 0) \n return 1; \n long a1 = fact[n];\n long a2 = modInverse(fact[r]) % prime;\n long a3 = modInverse(fact[n-r]) % prime;\n return ((fact[n] * a2)%prime * a3) % prime; \n } \n\t\n\tstatic class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { br = new BufferedReader(new InputStreamReader(System.in)); } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n } \n return st.nextToken(); \n }\n \n int nextInt() \n { return Integer.parseInt(next()); } \n \n long nextLong() \n { return Long.parseLong(next()); } \n \n double nextDouble() \n { return Double.parseDouble(next()); } \n \n long[] nextLongArray(int n){\n long[] a = new long[n];\n for(int i=0; i<n; i++)\n { a[i] = nextLong(); }\n return a;\n }\n \n int[] nextIntArray(int n){\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n { a[i] = nextInt(); }\n return a;\n }\n String nextLine() { \n String str = \"\"; \n try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n } \n return str; \n } \n } \n\t\n\t\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main\n{\n \n \n\tpublic static void main (String[] args) throws java.lang.Exception {\n\t FastReader reader = new FastReader();\n\t int temp = reader.nextInt() % 1000;\n\t\tif(temp == 0){\n System.out.println(0);\n }else{\n System.out.println(1000-temp);\n }\n\n\t\t\t \n }\n \n \n \n /* Iterative Function to calculate (x^y)%p in O(log y) */\n \n public static long prime = 1000000007;\n public static long[] fact;\n static long power(long x, long y) \n { \n // Initialize result \n long res = 1; \n // Update x if it is more than or \n // equal to p \n x = x % prime; \n \n while (y > 0) \n { \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n } \n \n return res; \n } \n \n // Returns n^(-1) mod p \n static long modInverse(long n) \n { return power(n, prime-2); } \n \n // Returns nCr % p using Fermat's little theorem. \n static long nCrModPFermat(int n, int r) \n { \n // Base case \n if (r == 0) \n return 1; \n long a1 = fact[n];\n long a2 = modInverse(fact[r]) % prime;\n long a3 = modInverse(fact[n-r]) % prime;\n return ((fact[n] * a2)%prime * a3) % prime; \n } \n\t\n\tstatic class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { br = new BufferedReader(new InputStreamReader(System.in)); } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n } \n return st.nextToken(); \n }\n \n int nextInt() \n { return Integer.parseInt(next()); } \n \n long nextLong() \n { return Long.parseLong(next()); } \n \n double nextDouble() \n { return Double.parseDouble(next()); } \n \n long[] nextLongArray(int n){\n long[] a = new long[n];\n for(int i=0; i<n; i++)\n { a[i] = nextLong(); }\n return a;\n }\n \n int[] nextIntArray(int n){\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n { a[i] = nextInt(); }\n return a;\n }\n String nextLine() { \n String str = \"\"; \n try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n } \n return str; \n } \n } \n\t\n\t\n}",
"Main",
"public static long prime = 1000000007;",
"prime",
"1000000007",
"public static long[] fact;",
"fact",
"public static void main (String[] args) throws java.lang.Exception {\n\t FastReader reader = new FastReader();\n\t int temp = reader.nextInt() % 1000;\n\t\tif(temp == 0){\n System.out.println(0);\n }else{\n System.out.println(1000-temp);\n }\n\n\t\t\t \n }",
"main",
"{\n\t FastReader reader = new FastReader();\n\t int temp = reader.nextInt() % 1000;\n\t\tif(temp == 0){\n System.out.println(0);\n }else{\n System.out.println(1000-temp);\n }\n\n\t\t\t \n }",
"FastReader reader = new FastReader();",
"reader",
"new FastReader()",
"int temp = reader.nextInt() % 1000;",
"temp",
"reader.nextInt() % 1000",
"reader.nextInt()",
"reader.nextInt",
"reader",
"1000",
"if(temp == 0){\n System.out.println(0);\n }else{\n System.out.println(1000-temp);\n }",
"temp == 0",
"temp",
"0",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n System.out.println(1000-temp);\n }",
"System.out.println(1000-temp)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-temp",
"1000",
"temp",
"String[] args",
"args",
"static long power(long x, long y) \n { \n // Initialize result \n long res = 1; \n // Update x if it is more than or \n // equal to p \n x = x % prime; \n \n while (y > 0) \n { \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n } \n \n return res; \n }",
"power",
"{ \n // Initialize result \n long res = 1; \n // Update x if it is more than or \n // equal to p \n x = x % prime; \n \n while (y > 0) \n { \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n } \n \n return res; \n }",
"long res = 1;",
"res",
"1",
"x = x % prime",
"x",
"x % prime",
"x",
"prime",
"while (y > 0) \n { \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n }",
"y > 0",
"y",
"0",
"{ \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n }",
"if (y % 2 == 1) \n res = (res * x) % prime;",
"y % 2 == 1",
"y % 2",
"y",
"2",
"1",
"res = (res * x) % prime",
"res",
"(res * x) % prime",
"(res * x)",
"res",
"x",
"prime",
"y = y >> 1",
"y",
"y >> 1",
"y",
"1",
"x = (x * x) % prime",
"x",
"(x * x) % prime",
"(x * x)",
"x",
"x",
"prime",
"return res;",
"res",
"long x",
"x",
"long y",
"y",
"// Returns n^(-1) mod p \n static long modInverse(long n) \n { return power(n, prime-2); }",
"modInverse",
"{ return power(n, prime-2); }",
"return power(n, prime-2);",
"power(n, prime-2)",
"power",
"n",
"prime-2",
"prime",
"2",
"long n",
"n",
"// Returns nCr % p using Fermat's little theorem. \n static long nCrModPFermat(int n, int r) \n { \n // Base case \n if (r == 0) \n return 1; \n long a1 = fact[n];\n long a2 = modInverse(fact[r]) % prime;\n long a3 = modInverse(fact[n-r]) % prime;\n return ((fact[n] * a2)%prime * a3) % prime; \n }",
"nCrModPFermat",
"{ \n // Base case \n if (r == 0) \n return 1; \n long a1 = fact[n];\n long a2 = modInverse(fact[r]) % prime;\n long a3 = modInverse(fact[n-r]) % prime;\n return ((fact[n] * a2)%prime * a3) % prime; \n }",
"if (r == 0) \n return 1;",
"r == 0",
"r",
"0",
"return 1;",
"1",
"long a1 = fact[n];",
"a1",
"fact[n]",
"fact",
"n",
"long a2 = modInverse(fact[r]) % prime;",
"a2",
"modInverse(fact[r]) % prime",
"modInverse(fact[r])",
"modInverse",
"fact[r]",
"fact",
"r",
"prime",
"long a3 = modInverse(fact[n-r]) % prime;",
"a3",
"modInverse(fact[n-r]) % prime",
"modInverse(fact[n-r])",
"modInverse",
"fact[n-r]",
"fact",
"n-r",
"n",
"r",
"prime",
"return ((fact[n] * a2)%prime * a3) % prime;",
"((fact[n] * a2)%prime * a3) % prime",
"((fact[n] * a2)%prime * a3)",
"(fact[n] * a2)%prime",
"(fact[n] * a2)",
"fact[n]",
"fact",
"n",
"a2",
"prime",
"a3",
"prime",
"int n",
"n",
"int r",
"r",
"static class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { br = new BufferedReader(new InputStreamReader(System.in)); } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n } \n return st.nextToken(); \n }\n \n int nextInt() \n { return Integer.parseInt(next()); } \n \n long nextLong() \n { return Long.parseLong(next()); } \n \n double nextDouble() \n { return Double.parseDouble(next()); } \n \n long[] nextLongArray(int n){\n long[] a = new long[n];\n for(int i=0; i<n; i++)\n { a[i] = nextLong(); }\n return a;\n }\n \n int[] nextIntArray(int n){\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n { a[i] = nextInt(); }\n return a;\n }\n String nextLine() { \n String str = \"\"; \n try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n } \n return str; \n } \n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() \n { br = new BufferedReader(new InputStreamReader(System.in)); }",
"FastReader",
"{ br = new BufferedReader(new InputStreamReader(System.in)); }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() \n { \n while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n } \n return st.nextToken(); \n }",
"next",
"{ \n while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n } \n return st.nextToken(); \n }",
"while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n }",
"try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }",
"catch (IOException e) { \n //e.printStackTrace();\n }",
"IOException e",
"{ \n //e.printStackTrace();\n }",
"{ st = new StringTokenizer(br.readLine()); \n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() \n { return Integer.parseInt(next()); }",
"nextInt",
"{ return Integer.parseInt(next()); }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() \n { return Long.parseLong(next()); }",
"nextLong",
"{ return Long.parseLong(next()); }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() \n { return Double.parseDouble(next()); }",
"nextDouble",
"{ return Double.parseDouble(next()); }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"long[] nextLongArray(int n){\n long[] a = new long[n];\n for(int i=0; i<n; i++)\n { a[i] = nextLong(); }\n return a;\n }",
"nextLongArray",
"{\n long[] a = new long[n];\n for(int i=0; i<n; i++)\n { a[i] = nextLong(); }\n return a;\n }",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for(int i=0; i<n; i++)\n { a[i] = nextLong(); }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{ a[i] = nextLong(); }",
"{ a[i] = nextLong(); }",
"a[i] = nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"int[] nextIntArray(int n){\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n { a[i] = nextInt(); }\n return a;\n }",
"nextIntArray",
"{\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n { a[i] = nextInt(); }\n return a;\n }",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0; i<n; i++)\n { a[i] = nextInt(); }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{ a[i] = nextInt(); }",
"{ a[i] = nextInt(); }",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"String nextLine() { \n String str = \"\"; \n try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n } \n return str; \n }",
"nextLine",
"{ \n String str = \"\"; \n try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n } \n return str; \n }",
"String str = \"\";",
"str",
"\"\"",
"try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n }",
"catch (IOException e) { \n //e.printStackTrace(); \n }",
"IOException e",
"{ \n //e.printStackTrace(); \n }",
"{ str = br.readLine(); \n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{\n \n \n\tpublic static void main (String[] args) throws java.lang.Exception {\n\t FastReader reader = new FastReader();\n\t int temp = reader.nextInt() % 1000;\n\t\tif(temp == 0){\n System.out.println(0);\n }else{\n System.out.println(1000-temp);\n }\n\n\t\t\t \n }\n \n \n \n /* Iterative Function to calculate (x^y)%p in O(log y) */\n \n public static long prime = 1000000007;\n public static long[] fact;\n static long power(long x, long y) \n { \n // Initialize result \n long res = 1; \n // Update x if it is more than or \n // equal to p \n x = x % prime; \n \n while (y > 0) \n { \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n } \n \n return res; \n } \n \n // Returns n^(-1) mod p \n static long modInverse(long n) \n { return power(n, prime-2); } \n \n // Returns nCr % p using Fermat's little theorem. \n static long nCrModPFermat(int n, int r) \n { \n // Base case \n if (r == 0) \n return 1; \n long a1 = fact[n];\n long a2 = modInverse(fact[r]) % prime;\n long a3 = modInverse(fact[n-r]) % prime;\n return ((fact[n] * a2)%prime * a3) % prime; \n } \n\t\n\tstatic class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { br = new BufferedReader(new InputStreamReader(System.in)); } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n } \n return st.nextToken(); \n }\n \n int nextInt() \n { return Integer.parseInt(next()); } \n \n long nextLong() \n { return Long.parseLong(next()); } \n \n double nextDouble() \n { return Double.parseDouble(next()); } \n \n long[] nextLongArray(int n){\n long[] a = new long[n];\n for(int i=0; i<n; i++)\n { a[i] = nextLong(); }\n return a;\n }\n \n int[] nextIntArray(int n){\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n { a[i] = nextInt(); }\n return a;\n }\n String nextLine() { \n String str = \"\"; \n try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n } \n return str; \n } \n } \n\t\n\t\n}",
"public class Main\n{\n \n \n\tpublic static void main (String[] args) throws java.lang.Exception {\n\t FastReader reader = new FastReader();\n\t int temp = reader.nextInt() % 1000;\n\t\tif(temp == 0){\n System.out.println(0);\n }else{\n System.out.println(1000-temp);\n }\n\n\t\t\t \n }\n \n \n \n /* Iterative Function to calculate (x^y)%p in O(log y) */\n \n public static long prime = 1000000007;\n public static long[] fact;\n static long power(long x, long y) \n { \n // Initialize result \n long res = 1; \n // Update x if it is more than or \n // equal to p \n x = x % prime; \n \n while (y > 0) \n { \n // If y is odd, multiply x with result \n if (y % 2 == 1) \n res = (res * x) % prime; \n // y must be even now \n y = y >> 1; // y = y/2 \n x = (x * x) % prime; \n } \n \n return res; \n } \n \n // Returns n^(-1) mod p \n static long modInverse(long n) \n { return power(n, prime-2); } \n \n // Returns nCr % p using Fermat's little theorem. \n static long nCrModPFermat(int n, int r) \n { \n // Base case \n if (r == 0) \n return 1; \n long a1 = fact[n];\n long a2 = modInverse(fact[r]) % prime;\n long a3 = modInverse(fact[n-r]) % prime;\n return ((fact[n] * a2)%prime * a3) % prime; \n } \n\t\n\tstatic class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { br = new BufferedReader(new InputStreamReader(System.in)); } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) { \n try{ st = new StringTokenizer(br.readLine()); \n }catch (IOException e) { \n //e.printStackTrace();\n }\n } \n return st.nextToken(); \n }\n \n int nextInt() \n { return Integer.parseInt(next()); } \n \n long nextLong() \n { return Long.parseLong(next()); } \n \n double nextDouble() \n { return Double.parseDouble(next()); } \n \n long[] nextLongArray(int n){\n long[] a = new long[n];\n for(int i=0; i<n; i++)\n { a[i] = nextLong(); }\n return a;\n }\n \n int[] nextIntArray(int n){\n int[] a = new int[n];\n for(int i=0; i<n; i++)\n { a[i] = nextInt(); }\n return a;\n }\n String nextLine() { \n String str = \"\"; \n try{ str = br.readLine(); \n } catch (IOException e) { \n //e.printStackTrace(); \n } \n return str; \n } \n } \n\t\n\t\n}",
"Main"
]
| //SHIVAM GARG
import java.util.*;
import java.lang.*;
import java.io.*;
/*
2
2
5 9
7
1 2 4 8 16 64 128
*/
public class Main
{
public static void main (String[] args) throws java.lang.Exception {
FastReader reader = new FastReader();
int temp = reader.nextInt() % 1000;
if(temp == 0){
System.out.println(0);
}else{
System.out.println(1000-temp);
}
}
/* Iterative Function to calculate (x^y)%p in O(log y) */
public static long prime = 1000000007;
public static long[] fact;
static long power(long x, long y)
{
// Initialize result
long res = 1;
// Update x if it is more than or
// equal to p
x = x % prime;
while (y > 0)
{
// If y is odd, multiply x with result
if (y % 2 == 1)
res = (res * x) % prime;
// y must be even now
y = y >> 1; // y = y/2
x = (x * x) % prime;
}
return res;
}
// Returns n^(-1) mod p
static long modInverse(long n)
{ return power(n, prime-2); }
// Returns nCr % p using Fermat's little theorem.
static long nCrModPFermat(int n, int r)
{
// Base case
if (r == 0)
return 1;
long a1 = fact[n];
long a2 = modInverse(fact[r]) % prime;
long a3 = modInverse(fact[n-r]) % prime;
return ((fact[n] * a2)%prime * a3) % prime;
}
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{ br = new BufferedReader(new InputStreamReader(System.in)); }
String next()
{
while (st == null || !st.hasMoreElements()) {
try{ st = new StringTokenizer(br.readLine());
}catch (IOException e) {
//e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt()
{ return Integer.parseInt(next()); }
long nextLong()
{ return Long.parseLong(next()); }
double nextDouble()
{ return Double.parseDouble(next()); }
long[] nextLongArray(int n){
long[] a = new long[n];
for(int i=0; i<n; i++)
{ a[i] = nextLong(); }
return a;
}
int[] nextIntArray(int n){
int[] a = new int[n];
for(int i=0; i<n; i++)
{ a[i] = nextInt(); }
return a;
}
String nextLine() {
String str = "";
try{ str = br.readLine();
} catch (IOException e) {
//e.printStackTrace();
}
return str;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
17,
30,
0,
13,
17,
14,
2,
13,
13,
30,
3,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
43,
5
],
[
43,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
6,
40
],
[
40,
41
],
[
0,
42
],
[
42,
43
],
[
42,
44
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\n\t\tint money=0;\n\n\t\twhile(true){\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(money-A);\n\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\n\t\tint money=0;\n\n\t\twhile(true){\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(money-A);\n\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\n\t\tint money=0;\n\n\t\twhile(true){\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(money-A);\n\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\n\t\tint money=0;\n\n\t\twhile(true){\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(money-A);\n\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int A = scan.nextInt();",
"A",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int money=0;",
"money",
"0",
"while(true){\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"true",
"{\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"money+=1000",
"money",
"1000",
"if(money>=A){\n\t\t\t\tbreak;\n\t\t\t}",
"money>=A",
"money",
"A",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"System.out.println(money-A)",
"System.out.println",
"System.out",
"System",
"System.out",
"money-A",
"money",
"A",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\n\t\tint money=0;\n\n\t\twhile(true){\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(money-A);\n\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\n\t\tint money=0;\n\n\t\twhile(true){\n\t\t\tmoney+=1000;\n\t\t\tif(money>=A){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(money-A);\n\n\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int money=0;
while(true){
money+=1000;
if(money>=A){
break;
}
}
System.out.println(money-A);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
17,
4,
18,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
38,
5
],
[
38,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
6,
35
],
[
35,
36
],
[
0,
37
],
[
37,
38
],
[
37,
39
]
]
| [
"import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tdouble N = sc.nextInt();\n \tint pay= 1000*(int)Math.ceil(N/1000);\n System.out.println((int)(pay-N));\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tdouble N = sc.nextInt();\n \tint pay= 1000*(int)Math.ceil(N/1000);\n System.out.println((int)(pay-N));\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tdouble N = sc.nextInt();\n \tint pay= 1000*(int)Math.ceil(N/1000);\n System.out.println((int)(pay-N));\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tdouble N = sc.nextInt();\n \tint pay= 1000*(int)Math.ceil(N/1000);\n System.out.println((int)(pay-N));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int pay= 1000*(int)Math.ceil(N/1000);",
"pay",
"1000*(int)Math.ceil(N/1000)",
"1000",
"(int)Math.ceil(N/1000)",
"Math.ceil",
"Math",
"N/1000",
"N",
"1000",
"System.out.println((int)(pay-N))",
"System.out.println",
"System.out",
"System",
"System.out",
"(int)(pay-N)",
"pay",
"N",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tdouble N = sc.nextInt();\n \tint pay= 1000*(int)Math.ceil(N/1000);\n System.out.println((int)(pay-N));\n }\n}",
"public class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n \tdouble N = sc.nextInt();\n \tint pay= 1000*(int)Math.ceil(N/1000);\n System.out.println((int)(pay-N));\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
double N = sc.nextInt();
int pay= 1000*(int)Math.ceil(N/1000);
System.out.println((int)(pay-N));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
17,
2,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
44,
5
],
[
44,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
22,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
6,
41
],
[
41,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int num = N / 1000;\n if (0 < N % 1000) {\n num++;\n }\n System.out.println(num * 1000 - N);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int num = N / 1000;\n if (0 < N % 1000) {\n num++;\n }\n System.out.println(num * 1000 - N);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int num = N / 1000;\n if (0 < N % 1000) {\n num++;\n }\n System.out.println(num * 1000 - N);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int num = N / 1000;\n if (0 < N % 1000) {\n num++;\n }\n System.out.println(num * 1000 - N);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int num = N / 1000;",
"num",
"N / 1000",
"N",
"1000",
"if (0 < N % 1000) {\n num++;\n }",
"0 < N % 1000",
"0",
"N % 1000",
"N",
"1000",
"{\n num++;\n }",
"num++",
"num",
"System.out.println(num * 1000 - N)",
"System.out.println",
"System.out",
"System",
"System.out",
"num * 1000 - N",
"num * 1000",
"num",
"1000",
"N",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int num = N / 1000;\n if (0 < N % 1000) {\n num++;\n }\n System.out.println(num * 1000 - N);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int num = N / 1000;\n if (0 < N % 1000) {\n num++;\n }\n System.out.println(num * 1000 - N);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int num = N / 1000;
if (0 < N % 1000) {
num++;
}
System.out.println(num * 1000 - N);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
30,
4,
18,
13,
17,
30,
4,
18,
13,
2,
17,
2,
13,
17,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
41,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
29,
17,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
159,
17
],
[
159,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
20,
45
],
[
45,
46
],
[
46,
47
],
[
18,
48
],
[
48,
49
],
[
159,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
60,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
52,
80
],
[
80,
81
],
[
52,
82
],
[
82,
83
],
[
159,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
84,
88
],
[
88,
89
],
[
84,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
90,
96
],
[
96,
97
],
[
84,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
101,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
114,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
110,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
131,
132
],
[
110,
133
],
[
133,
134
],
[
133,
135
],
[
100,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
84,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
147,
148
],
[
84,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
156,
157
],
[
0,
158
],
[
158,
159
],
[
158,
160
]
]
| [
"import java.io.*;\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\nimport java.math.RoundingMode;\nimport java.util.*;\n\n/**\n * @author Tran Anh Tai\n * @template for CP codes\n * What a trick prob!\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int n = in.nextInt();\n if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.math.RoundingMode;",
"RoundingMode",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int n = in.nextInt();\n if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"Task solver = new Task();",
"solver",
"new Task()",
"solver.solve(in, out)",
"solver.solve",
"solver",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int n = in.nextInt();\n if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }\n }\n }",
"Task",
"public void solve(InputReader in, PrintWriter out) {\n int n = in.nextInt();\n if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }\n }",
"solve",
"{\n int n = in.nextInt();\n if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }\n }",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"{\n out.println(0);\n }",
"out.println(0)",
"out.println",
"out",
"0",
"{\n out.println(1000 - (n % 1000));\n }",
"out.println(1000 - (n % 1000))",
"out.println",
"out",
"1000 - (n % 1000)",
"1000",
"(n % 1000)",
"n",
"1000",
"InputReader in",
"in",
"PrintWriter out",
"out",
"static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }",
"InputReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }",
"InputReader",
"{\n br = new BufferedReader(new InputStreamReader(stream));\n }",
"br = new BufferedReader(new InputStreamReader(stream))",
"br",
"new BufferedReader(new InputStreamReader(stream))",
"InputStream stream",
"stream",
"public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }",
"nextToken",
"{\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }",
"String line = null;",
"line",
"null",
"try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n line = br.readLine();\n }",
"line = br.readLine()",
"line",
"br.readLine()",
"br.readLine",
"br",
"if (line == null) {\n return null;\n }",
"line == null",
"line",
"null",
"{\n return null;\n }",
"return null;",
"null",
"st = new StringTokenizer(line)",
"st",
"new StringTokenizer(line)",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() {\n return Integer.parseInt(nextToken());\n }",
"nextInt",
"{\n return Integer.parseInt(nextToken());\n }",
"return Integer.parseInt(nextToken());",
"Integer.parseInt(nextToken())",
"Integer.parseInt",
"Integer",
"nextToken()",
"nextToken",
"public long nextLong(){\n return Long.parseLong(nextToken());\n }",
"nextLong",
"{\n return Long.parseLong(nextToken());\n }",
"return Long.parseLong(nextToken());",
"Long.parseLong(nextToken())",
"Long.parseLong",
"Long",
"nextToken()",
"nextToken",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int n = in.nextInt();\n if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(in, out);\n out.close();\n }\n // main solver\n static class Task{\n public void solve(InputReader in, PrintWriter out) {\n int n = in.nextInt();\n if (n % 1000 == 0){\n out.println(0);\n }\n else{\n out.println(1000 - (n % 1000));\n }\n }\n }\n // fast input reader class;\n static class InputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n String line = null;\n try {\n line = br.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n if (line == null) {\n return null;\n }\n st = new StringTokenizer(line);\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n public long nextLong(){\n return Long.parseLong(nextToken());\n }\n }\n}",
"Main"
]
| import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;
/**
* @author Tran Anh Tai
* @template for CP codes
* What a trick prob!
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
Task solver = new Task();
solver.solve(in, out);
out.close();
}
// main solver
static class Task{
public void solve(InputReader in, PrintWriter out) {
int n = in.nextInt();
if (n % 1000 == 0){
out.println(0);
}
else{
out.println(1000 - (n % 1000));
}
}
}
// fast input reader class;
static class InputReader {
BufferedReader br;
StringTokenizer st;
public InputReader(InputStream stream) {
br = new BufferedReader(new InputStreamReader(stream));
}
public String nextToken() {
while (st == null || !st.hasMoreTokens()) {
String line = null;
try {
line = br.readLine();
} catch (IOException e) {
throw new RuntimeException(e);
}
if (line == null) {
return null;
}
st = new StringTokenizer(line);
}
return st.nextToken();
}
public int nextInt() {
return Integer.parseInt(nextToken());
}
public long nextLong(){
return Long.parseLong(nextToken());
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
8,
2,
13,
17,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
47,
11
],
[
47,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
12,
44
],
[
44,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.lang.*;\n \npublic class Main {\n \tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \twhile (n>=1000) {\n \tn-=1000; \n }\n \tSystem.out.println(n==0 ? n : 1000-n);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main {\n \tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \twhile (n>=1000) {\n \tn-=1000; \n }\n \tSystem.out.println(n==0 ? n : 1000-n);\n }\n}",
"Main",
"public static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \twhile (n>=1000) {\n \tn-=1000; \n }\n \tSystem.out.println(n==0 ? n : 1000-n);\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \twhile (n>=1000) {\n \tn-=1000; \n }\n \tSystem.out.println(n==0 ? n : 1000-n);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while (n>=1000) {\n \tn-=1000; \n }",
"n>=1000",
"n",
"1000",
"{\n \tn-=1000; \n }",
"n-=1000",
"n",
"1000",
"System.out.println(n==0 ? n : 1000-n)",
"System.out.println",
"System.out",
"System",
"System.out",
"n==0 ? n : 1000-n",
"n==0",
"n",
"0",
"n",
"1000-n",
"1000",
"n",
"String[] args",
"args",
"public class Main {\n \tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \twhile (n>=1000) {\n \tn-=1000; \n }\n \tSystem.out.println(n==0 ? n : 1000-n);\n }\n}",
"public class Main {\n \tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \twhile (n>=1000) {\n \tn-=1000; \n }\n \tSystem.out.println(n==0 ? n : 1000-n);\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.lang.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while (n>=1000) {
n-=1000;
}
System.out.println(n==0 ? n : 1000-n);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
51,
14
],
[
51,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
26,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
15,
48
],
[
48,
49
],
[
0,
50
],
[
50,
51
],
[
50,
52
]
]
| [
"import java.lang.reflect.Array;\nimport java.util.*;\nimport java.io.*;\nimport java.lang.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n if (a%1000 == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000-(a%1000));\n\n }\n}",
"import java.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n if (a%1000 == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000-(a%1000));\n\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n if (a%1000 == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000-(a%1000));\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n if (a%1000 == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000-(a%1000));\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (a%1000 == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000-(a%1000));",
"a%1000 == 0",
"a%1000",
"a",
"1000",
"0",
"System.out.println(\"0\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"0\"",
"System.out.println(1000-(a%1000))",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-(a%1000)",
"1000",
"(a%1000)",
"a",
"1000",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n if (a%1000 == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000-(a%1000));\n\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n if (a%1000 == 0)\n System.out.println(\"0\");\n else\n System.out.println(1000-(a%1000));\n\n }\n}",
"Main"
]
| import java.lang.reflect.Array;
import java.util.*;
import java.io.*;
import java.lang.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
if (a%1000 == 0)
System.out.println("0");
else
System.out.println(1000-(a%1000));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
42,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
40,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
14,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
12,
41
],
[
41,
42
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nclass Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n while(n > 0){\n n -= 1000;\n }\n System.out.println(-n);\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n while(n > 0){\n n -= 1000;\n }\n System.out.println(-n);\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n while(n > 0){\n n -= 1000;\n }\n System.out.println(-n);\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int n = Integer.parseInt(br.readLine());\n while(n > 0){\n n -= 1000;\n }\n System.out.println(-n);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"while(n > 0){\n n -= 1000;\n }",
"n > 0",
"n",
"0",
"{\n n -= 1000;\n }",
"n -= 1000",
"n",
"1000",
"System.out.println(-n)",
"System.out.println",
"System.out",
"System",
"System.out",
"-n",
"n",
"String[] args",
"args"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
while(n > 0){
n -= 1000;
}
System.out.println(-n);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
2,
13,
17,
17,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
4,
13,
4,
18,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
4,
13,
17,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
4,
18,
13,
17,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
434,
8
],
[
434,
9
],
[
9,
10
],
[
434,
11
],
[
11,
12
],
[
434,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
15,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
24,
30
],
[
434,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
37,
39
],
[
33,
40
],
[
40,
41
],
[
40,
42
],
[
33,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
43,
48
],
[
48,
49
],
[
33,
50
],
[
50,
51
],
[
51,
52
],
[
31,
53
],
[
53,
54
],
[
434,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
58,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
72,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
72,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
91,
93
],
[
72,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
55,
99
],
[
99,
100
],
[
434,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
104,
114
],
[
114,
115
],
[
115,
116
],
[
104,
117
],
[
118,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
121,
125
],
[
125,
126
],
[
125,
127
],
[
118,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
118,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
137,
138
],
[
137,
139
],
[
118,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
101,
145
],
[
145,
146
],
[
434,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
147,
151
],
[
151,
152
],
[
147,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
153,
159
],
[
159,
160
],
[
147,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
161,
167
],
[
167,
168
],
[
147,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
172,
181
],
[
181,
182
],
[
181,
183
],
[
171,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
147,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
195,
200
],
[
200,
201
],
[
200,
202
],
[
195,
203
],
[
203,
204
],
[
204,
205
],
[
195,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
211,
212
],
[
190,
213
],
[
213,
214
],
[
188,
215
],
[
215,
216
],
[
147,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
219,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
224,
229
],
[
229,
230
],
[
229,
231
],
[
224,
232
],
[
232,
233
],
[
233,
234
],
[
224,
235
],
[
235,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
236,
240
],
[
240,
241
],
[
219,
242
],
[
242,
243
],
[
217,
244
],
[
244,
245
],
[
147,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
253,
258
],
[
258,
259
],
[
258,
260
],
[
253,
261
],
[
261,
262
],
[
262,
263
],
[
253,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
265,
269
],
[
269,
270
],
[
248,
271
],
[
271,
272
],
[
271,
273
],
[
248,
274
],
[
274,
275
],
[
275,
276
],
[
274,
277
],
[
248,
278
],
[
278,
279
],
[
246,
280
],
[
280,
281
],
[
147,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
289,
294
],
[
294,
295
],
[
294,
296
],
[
289,
297
],
[
297,
298
],
[
298,
299
],
[
289,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
301,
305
],
[
305,
306
],
[
284,
307
],
[
307,
308
],
[
307,
309
],
[
284,
310
],
[
310,
311
],
[
311,
312
],
[
310,
313
],
[
284,
314
],
[
314,
315
],
[
282,
316
],
[
316,
317
],
[
147,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
320,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
325,
330
],
[
330,
331
],
[
330,
332
],
[
325,
333
],
[
333,
334
],
[
334,
335
],
[
325,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
337,
341
],
[
341,
342
],
[
320,
343
],
[
343,
344
],
[
318,
345
],
[
345,
346
],
[
147,
347
],
[
347,
348
],
[
347,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
349,
354
],
[
354,
355
],
[
355,
356
],
[
356,
357
],
[
356,
358
],
[
354,
359
],
[
359,
360
],
[
359,
361
],
[
354,
362
],
[
362,
363
],
[
363,
364
],
[
354,
365
],
[
365,
366
],
[
366,
367
],
[
367,
368
],
[
367,
369
],
[
366,
370
],
[
370,
371
],
[
349,
372
],
[
372,
373
],
[
347,
374
],
[
374,
375
],
[
147,
376
],
[
376,
377
],
[
376,
378
],
[
378,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
147,
383
],
[
383,
384
],
[
383,
385
],
[
385,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
387,
390
],
[
390,
391
],
[
147,
392
],
[
392,
393
],
[
392,
394
],
[
394,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
396,
399
],
[
399,
400
],
[
147,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
404,
405
],
[
405,
406
],
[
406,
407
],
[
407,
408
],
[
405,
409
],
[
147,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
413,
414
],
[
414,
415
],
[
415,
416
],
[
414,
417
],
[
417,
418
],
[
147,
419
],
[
419,
420
],
[
419,
421
],
[
421,
422
],
[
422,
423
],
[
423,
424
],
[
424,
425
],
[
147,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
429,
432
],
[
0,
433
],
[
433,
434
],
[
433,
435
]
]
| [
"import java.io.*;\nimport java.util.*;\npublic class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt()\n\t\t\t\t;\n\t\tpw.println((1000-(n%1000))%1000);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tsc=new MScanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt()\n\t\t\t\t;\n\t\tpw.println((1000-(n%1000))%1000);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tsc=new MScanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"Main",
"static PrintWriter pw;",
"pw",
"static MScanner sc;",
"sc",
"static void main() throws Exception{\n\t\tint n=sc.nextInt()\n\t\t\t\t;\n\t\tpw.println((1000-(n%1000))%1000);\n\t}",
"main",
"{\n\t\tint n=sc.nextInt()\n\t\t\t\t;\n\t\tpw.println((1000-(n%1000))%1000);\n\t}",
"int n=sc.nextInt()\n\t\t\t\t;",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"pw.println((1000-(n%1000))%1000)",
"pw.println",
"pw",
"(1000-(n%1000))%1000",
"(1000-(n%1000))",
"1000",
"(n%1000)",
"n",
"1000",
"1000",
"public static void main(String[] args) throws Exception{\n\t\tsc=new MScanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}",
"main",
"{\n\t\tsc=new MScanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}",
"sc=new MScanner(System.in)",
"sc",
"new MScanner(System.in)",
"pw = new PrintWriter(System.out)",
"pw",
"new PrintWriter(System.out)",
"int tc=1;",
"tc",
"1",
"while(tc-->0)\n\t\t\tmain();",
"tc-->0",
"tc--",
"tc",
"0",
"main()",
"main",
"pw.flush()",
"pw.flush",
"pw",
"String[] args",
"args",
"static void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"shuffle",
"{\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"for(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<in.length",
"i",
"in.length",
"in",
"in.length",
"i++",
"i++",
"i",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int idx=(int)(Math.random()*in.length);",
"idx",
"(int)(Math.random()*in.length)",
"Math.random()",
"Math.random",
"Math",
"in.length",
"in",
"in.length",
"int tmp=in[i];",
"tmp",
"in[i]",
"in",
"i",
"in[i]=in[idx]",
"in[i]",
"in",
"i",
"in[idx]",
"in",
"idx",
"in[idx]=tmp",
"in[idx]",
"in",
"idx",
"tmp",
"int[]in",
"in",
"static void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"shuffle",
"{\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}",
"for(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<in.length",
"i",
"in.length",
"in",
"in.length",
"i++",
"i++",
"i",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"{\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}",
"int idx=(int)(Math.random()*in.length);",
"idx",
"(int)(Math.random()*in.length)",
"Math.random()",
"Math.random",
"Math",
"in.length",
"in",
"in.length",
"long tmp=in[i];",
"tmp",
"in[i]",
"in",
"i",
"in[i]=in[idx]",
"in[i]",
"in",
"i",
"in[idx]",
"in",
"idx",
"in[idx]=tmp",
"in[idx]",
"in",
"idx",
"tmp",
"long[]in",
"in",
"static class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}",
"MScanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}",
"MScanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(system))",
"br",
"new BufferedReader(new InputStreamReader(system))",
"InputStream system",
"system",
"public MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}",
"MScanner",
"{\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}",
"br = new BufferedReader(new FileReader(file))",
"br",
"new BufferedReader(new FileReader(file))",
"String file",
"file",
"public String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"intArr",
"{\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"int[]in=new int[n];",
"in",
"new int[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"return in;",
"in",
"int n",
"n",
"public long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"longArr",
"{\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"long[]in=new long[n];",
"in",
"new long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"return in;",
"in",
"int n",
"n",
"public int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"intSortedArr",
"{\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"int[]in=new int[n];",
"in",
"new int[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"shuffle(in)",
"shuffle",
"in",
"Arrays.sort(in)",
"Arrays.sort",
"Arrays",
"in",
"return in;",
"in",
"int n",
"n",
"public long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"longSortedArr",
"{\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}",
"long[]in=new long[n];",
"in",
"new long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"shuffle(in)",
"shuffle",
"in",
"Arrays.sort(in)",
"Arrays.sort",
"Arrays",
"in",
"return in;",
"in",
"int n",
"n",
"public Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"IntegerArr",
"{\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}",
"Integer[]in=new Integer[n];",
"in",
"new Integer[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextInt();",
"in[i]=nextInt()",
"in[i]",
"in",
"i",
"nextInt()",
"nextInt",
"return in;",
"in",
"int n",
"n",
"public Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"LongArr",
"{\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}",
"Long[]in=new Long[n];",
"in",
"new Long[n]",
"n",
"for(int i=0;i<n;i++)in[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"in[i]=nextLong();",
"in[i]=nextLong()",
"in[i]",
"in",
"i",
"nextLong()",
"nextLong",
"return in;",
"in",
"int n",
"n",
"public String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}",
"nextLine",
"{\n\t\t\treturn br.readLine();\n\t\t}",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"public int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}",
"nextChar",
"{\n\t\t\treturn next().charAt(0);\n\t\t}",
"return next().charAt(0);",
"next().charAt(0)",
"next().charAt",
"next()",
"next",
"0",
"public long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}",
"ready",
"{\n\t\t\treturn br.ready();\n\t\t}",
"return br.ready();",
"br.ready()",
"br.ready",
"br",
"public void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}",
"waitForInput",
"{\n\t\t\tThread.sleep(3000);\n\t\t}",
"Thread.sleep(3000)",
"Thread.sleep",
"Thread",
"3000",
"public class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt()\n\t\t\t\t;\n\t\tpw.println((1000-(n%1000))%1000);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tsc=new MScanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"public class Main{\n\tstatic void main() throws Exception{\n\t\tint n=sc.nextInt()\n\t\t\t\t;\n\t\tpw.println((1000-(n%1000))%1000);\n\t}\n\tpublic static void main(String[] args) throws Exception{\n\t\tsc=new MScanner(System.in);\n\t\tpw = new PrintWriter(System.out);\n\t\tint tc=1;\n//\t\ttc=sc.nextInt();\n\t\twhile(tc-->0)\n\t\t\tmain();\n\t\tpw.flush();\n\t}\n\tstatic PrintWriter pw;\n\tstatic MScanner sc;\n\tstatic class MScanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\t\tpublic MScanner(InputStream system) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(system));\n\t\t}\n \n\t\tpublic MScanner(String file) throws Exception {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}\n \n\t\tpublic String next() throws IOException {\n\t\t\twhile (st == null || !st.hasMoreTokens())\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tpublic int[] intArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic long[] longArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic int[] intSortedArr(int n) throws IOException {\n\t int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic long[] longSortedArr(int n) throws IOException {\n\t long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t shuffle(in);\n\t Arrays.sort(in);\n\t return in;\n\t\t}\n\t\tpublic Integer[] IntegerArr(int n) throws IOException {\n\t Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();\n\t return in;\n\t\t}\n\t\tpublic Long[] LongArr(int n) throws IOException {\n\t Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();\n\t return in;\n\t\t}\n\t\tpublic String nextLine() throws IOException {\n\t\t\treturn br.readLine();\n\t\t}\n \n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tpublic double nextDouble() throws IOException {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tpublic char nextChar() throws IOException {\n\t\t\treturn next().charAt(0);\n\t\t}\n \n\t\tpublic long nextLong() throws IOException {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tpublic boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n \n\t\tpublic void waitForInput() throws InterruptedException {\n\t\t\tThread.sleep(3000);\n\t\t}\n\t}\n\tstatic void shuffle(int[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tint tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n\tstatic void shuffle(long[]in) {\n\t\tfor(int i=0;i<in.length;i++) {\n\t\t\tint idx=(int)(Math.random()*in.length);\n\t\t\tlong tmp=in[i];\n\t\t\tin[i]=in[idx];\n\t\t\tin[idx]=tmp;\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main{
static void main() throws Exception{
int n=sc.nextInt()
;
pw.println((1000-(n%1000))%1000);
}
public static void main(String[] args) throws Exception{
sc=new MScanner(System.in);
pw = new PrintWriter(System.out);
int tc=1;
// tc=sc.nextInt();
while(tc-->0)
main();
pw.flush();
}
static PrintWriter pw;
static MScanner sc;
static class MScanner {
StringTokenizer st;
BufferedReader br;
public MScanner(InputStream system) {
br = new BufferedReader(new InputStreamReader(system));
}
public MScanner(String file) throws Exception {
br = new BufferedReader(new FileReader(file));
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int[] intArr(int n) throws IOException {
int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
return in;
}
public long[] longArr(int n) throws IOException {
long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
return in;
}
public int[] intSortedArr(int n) throws IOException {
int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
shuffle(in);
Arrays.sort(in);
return in;
}
public long[] longSortedArr(int n) throws IOException {
long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
shuffle(in);
Arrays.sort(in);
return in;
}
public Integer[] IntegerArr(int n) throws IOException {
Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();
return in;
}
public Long[] LongArr(int n) throws IOException {
Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();
return in;
}
public String nextLine() throws IOException {
return br.readLine();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
public double nextDouble() throws IOException {
return Double.parseDouble(next());
}
public char nextChar() throws IOException {
return next().charAt(0);
}
public long nextLong() throws IOException {
return Long.parseLong(next());
}
public boolean ready() throws IOException {
return br.ready();
}
public void waitForInput() throws InterruptedException {
Thread.sleep(3000);
}
}
static void shuffle(int[]in) {
for(int i=0;i<in.length;i++) {
int idx=(int)(Math.random()*in.length);
int tmp=in[i];
in[i]=in[idx];
in[idx]=tmp;
}
}
static void shuffle(long[]in) {
for(int i=0;i<in.length;i++) {
int idx=(int)(Math.random()*in.length);
long tmp=in[i];
in[i]=in[idx];
in[idx]=tmp;
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
0,
13,
2,
17,
13,
40,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
46,
5
],
[
46,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
27,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
6,
43
],
[
43,
44
],
[
0,
45
],
[
45,
46
],
[
45,
47
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint p = sc.nextInt();\n\t\tint a =1000;\n\t\tint i=2;\n\t\twhile(a<p) {\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(a-p);\n\n\t}\n\n}\n\n\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint p = sc.nextInt();\n\t\tint a =1000;\n\t\tint i=2;\n\t\twhile(a<p) {\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(a-p);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint p = sc.nextInt();\n\t\tint a =1000;\n\t\tint i=2;\n\t\twhile(a<p) {\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(a-p);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint p = sc.nextInt();\n\t\tint a =1000;\n\t\tint i=2;\n\t\twhile(a<p) {\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(a-p);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int p = sc.nextInt();",
"p",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a =1000;",
"a",
"1000",
"int i=2;",
"i",
"2",
"while(a<p) {\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}",
"a<p",
"a",
"p",
"{\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}",
"a=1000*i",
"a",
"1000*i",
"1000",
"i",
"i++",
"i",
"System.out.println(a-p)",
"System.out.println",
"System.out",
"System",
"System.out",
"a-p",
"a",
"p",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint p = sc.nextInt();\n\t\tint a =1000;\n\t\tint i=2;\n\t\twhile(a<p) {\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(a-p);\n\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint p = sc.nextInt();\n\t\tint a =1000;\n\t\tint i=2;\n\t\twhile(a<p) {\n\t\t\ta=1000*i;\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(a-p);\n\n\t}\n\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int p = sc.nextInt();
int a =1000;
int i=2;
while(a<p) {
a=1000*i;
i++;
}
System.out.println(a-p);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
30,
4,
18,
13,
17,
30,
4,
18,
13,
2,
2,
2,
2,
13,
17,
17,
17,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
53,
8
],
[
53,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
23,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
23,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
39,
45
],
[
38,
46
],
[
11,
47
],
[
47,
48
],
[
48,
49
],
[
9,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n if(n % 1000 == 0)\n {\n out.println(0);\n }\n else\n {\n out.println((n / 1000 + 1) * 1000 - n);\n }\n out.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n if(n % 1000 == 0)\n {\n out.println(0);\n }\n else\n {\n out.println((n / 1000 + 1) * 1000 - n);\n }\n out.close();\n }\n}",
"Main",
"public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n if(n % 1000 == 0)\n {\n out.println(0);\n }\n else\n {\n out.println((n / 1000 + 1) * 1000 - n);\n }\n out.close();\n }",
"main",
"{\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n if(n % 1000 == 0)\n {\n out.println(0);\n }\n else\n {\n out.println((n / 1000 + 1) * 1000 - n);\n }\n out.close();\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"if(n % 1000 == 0)\n {\n out.println(0);\n }\n else\n {\n out.println((n / 1000 + 1) * 1000 - n);\n }",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"{\n out.println(0);\n }",
"out.println(0)",
"out.println",
"out",
"0",
"{\n out.println((n / 1000 + 1) * 1000 - n);\n }",
"out.println((n / 1000 + 1) * 1000 - n)",
"out.println",
"out",
"(n / 1000 + 1) * 1000 - n",
"(n / 1000 + 1) * 1000",
"(n / 1000 + 1)",
"n / 1000",
"n",
"1000",
"1",
"1000",
"n",
"out.close()",
"out.close",
"out",
"String agrs[]",
"agrs",
"public class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n if(n % 1000 == 0)\n {\n out.println(0);\n }\n else\n {\n out.println((n / 1000 + 1) * 1000 - n);\n }\n out.close();\n }\n}",
"public class Main{\n public static void main(String agrs[])\n {\n Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n if(n % 1000 == 0)\n {\n out.println(0);\n }\n else\n {\n out.println((n / 1000 + 1) * 1000 - n);\n }\n out.close();\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main{
public static void main(String agrs[])
{
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt();
if(n % 1000 == 0)
{
out.println(0);
}
else
{
out.println((n / 1000 + 1) * 1000 - n);
}
out.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
13,
30,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
41,
5
],
[
41,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
6,
38
],
[
38,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int payment = sc.nextInt();\n int yen = 1000;\n while(yen<payment){\n yen = yen + 1000;\n }\n System.out.println(yen - payment);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int payment = sc.nextInt();\n int yen = 1000;\n while(yen<payment){\n yen = yen + 1000;\n }\n System.out.println(yen - payment);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int payment = sc.nextInt();\n int yen = 1000;\n while(yen<payment){\n yen = yen + 1000;\n }\n System.out.println(yen - payment);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int payment = sc.nextInt();\n int yen = 1000;\n while(yen<payment){\n yen = yen + 1000;\n }\n System.out.println(yen - payment);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int payment = sc.nextInt();",
"payment",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int yen = 1000;",
"yen",
"1000",
"while(yen<payment){\n yen = yen + 1000;\n }",
"yen<payment",
"yen",
"payment",
"{\n yen = yen + 1000;\n }",
"yen = yen + 1000",
"yen",
"yen + 1000",
"yen",
"1000",
"System.out.println(yen - payment)",
"System.out.println",
"System.out",
"System",
"System.out",
"yen - payment",
"yen",
"payment",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int payment = sc.nextInt();\n int yen = 1000;\n while(yen<payment){\n yen = yen + 1000;\n }\n System.out.println(yen - payment);\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int payment = sc.nextInt();\n int yen = 1000;\n while(yen<payment){\n yen = yen + 1000;\n }\n System.out.println(yen - payment);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int payment = sc.nextInt();
int yen = 1000;
while(yen<payment){
yen = yen + 1000;
}
System.out.println(yen - payment);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
17,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
49,
5
],
[
49,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
22,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
49,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
0,
48
],
[
48,
49
],
[
48,
50
]
]
| [
"import java.util.*;\npublic class Main {\n public void solve() {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int A = N%1000;\n if(A == 0)System.out.println(0);\n else System.out.println(1000-A);\n\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public void solve() {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int A = N%1000;\n if(A == 0)System.out.println(0);\n else System.out.println(1000-A);\n\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}",
"Main",
"public void solve() {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int A = N%1000;\n if(A == 0)System.out.println(0);\n else System.out.println(1000-A);\n\n }",
"solve",
"{\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int A = N%1000;\n if(A == 0)System.out.println(0);\n else System.out.println(1000-A);\n\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int A = N%1000;",
"A",
"N%1000",
"N",
"1000",
"if(A == 0)System.out.println(0);\n else System.out.println(1000-A);",
"A == 0",
"A",
"0",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"System.out.println(1000-A)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-A",
"1000",
"A",
"public static void main(String[] args) {\n new Main().solve();\n }",
"main",
"{\n new Main().solve();\n }",
"new Main().solve()",
"new Main().solve",
"new Main()",
"String[] args",
"args",
"public class Main {\n public void solve() {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int A = N%1000;\n if(A == 0)System.out.println(0);\n else System.out.println(1000-A);\n\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}",
"public class Main {\n public void solve() {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n int A = N%1000;\n if(A == 0)System.out.println(0);\n else System.out.println(1000-A);\n\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public void solve() {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int A = N%1000;
if(A == 0)System.out.println(0);
else System.out.println(1000-A);
}
public static void main(String[] args) {
new Main().solve();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
17,
30,
4,
18,
18,
13,
13,
13,
4,
18,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
29,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
31,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
38,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
6,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.util.*;\npublic class Main\n{\n public static void main(String []args)\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n for(int i=0;i<1000;i++)\n {\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{\n public static void main(String []args)\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n for(int i=0;i<1000;i++)\n {\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }\n }\n}",
"Main",
"public static void main(String []args)\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n for(int i=0;i<1000;i++)\n {\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n for(int i=0;i<1000;i++)\n {\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a=sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<1000;i++)\n {\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<1000",
"i",
"1000",
"i++",
"i++",
"i",
"{\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }",
"{\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }",
"if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }",
"(a+i)%1000==0",
"(a+i)%1000",
"(a+i)",
"a",
"i",
"1000",
"0",
"{ \n System.out.println(i);\n System.exit(0);\n }",
"System.out.println(i)",
"System.out.println",
"System.out",
"System",
"System.out",
"i",
"System.exit(0)",
"System.exit",
"System",
"0",
"String []args",
"args",
"public class Main\n{\n public static void main(String []args)\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n for(int i=0;i<1000;i++)\n {\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }\n }\n}",
"public class Main\n{\n public static void main(String []args)\n {\n Scanner sc=new Scanner(System.in);\n int a=sc.nextInt();\n for(int i=0;i<1000;i++)\n {\n if((a+i)%1000==0)\n { \n System.out.println(i);\n System.exit(0);\n }\n }\n }\n}",
"Main"
]
| import java.util.*;
public class Main
{
public static void main(String []args)
{
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
for(int i=0;i<1000;i++)
{
if((a+i)%1000==0)
{
System.out.println(i);
System.exit(0);
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
17,
13,
14,
2,
13,
13,
30,
9,
30,
0,
13,
2,
13,
13,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
60,
5
],
[
60,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
44,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
6,
57
],
[
57,
58
],
[
0,
59
],
[
59,
60
],
[
59,
61
]
]
| [
"import java.util.Scanner;\n \npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n int answer = 0;\n \n for (int i = 1; i < 11; i++) {\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }\n System.out.println(answer);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n int answer = 0;\n \n for (int i = 1; i < 11; i++) {\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }\n System.out.println(answer);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n int answer = 0;\n \n for (int i = 1; i < 11; i++) {\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }\n System.out.println(answer);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n int answer = 0;\n \n for (int i = 1; i < 11; i++) {\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }\n System.out.println(answer);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int num = scanner.nextInt();",
"num",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int answer = 0;",
"answer",
"0",
"for (int i = 1; i < 11; i++) {\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < 11",
"i",
"11",
"i++",
"i++",
"i",
"{\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }",
"{\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }",
"int bill = 1000*i;",
"bill",
"1000*i",
"1000",
"i",
"if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }",
"num > bill",
"num",
"bill",
"{\n \tcontinue; \n }",
"continue;",
"{\n \tanswer = bill-num;\n break;\n }",
"answer = bill-num",
"answer",
"bill-num",
"bill",
"num",
"break;",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n int answer = 0;\n \n for (int i = 1; i < 11; i++) {\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }\n System.out.println(answer);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n int answer = 0;\n \n for (int i = 1; i < 11; i++) {\n int bill = 1000*i;\n if (num > bill) {\n \tcontinue; \n } else {\n \tanswer = bill-num;\n break;\n }\n }\n System.out.println(answer);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int num = scanner.nextInt();
int answer = 0;
for (int i = 1; i < 11; i++) {
int bill = 1000*i;
if (num > bill) {
continue;
} else {
answer = bill-num;
break;
}
}
System.out.println(answer);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
8,
2,
2,
13,
17,
17,
17,
2,
17,
2,
13,
17,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
14,
2,
4,
18,
13,
17,
17,
30,
0,
13,
17,
40,
13,
11,
1,
41,
13,
13,
2,
13,
4,
18,
13,
1,
40,
13,
30,
14,
2,
4,
18,
13,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
20,
0,
13,
17,
30,
4,
18,
13,
4,
18,
13,
13,
14,
13,
0,
13,
17,
0,
13,
2,
4,
18,
13,
4,
18,
13,
13,
29,
2,
13,
8,
13,
40,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
218,
11
],
[
218,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
28,
34
],
[
28,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
14,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
14,
44
],
[
44,
45
],
[
45,
46
],
[
12,
47
],
[
47,
48
],
[
218,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
49,
53
],
[
53,
54
],
[
49,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
55,
61
],
[
61,
62
],
[
49,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
66,
75
],
[
75,
76
],
[
75,
77
],
[
65,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
49,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
49,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
49,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
49,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
49,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
120,
122
],
[
116,
123
],
[
123,
124
],
[
123,
125
],
[
116,
126
],
[
126,
127
],
[
126,
128
],
[
116,
129
],
[
129,
130
],
[
129,
131
],
[
116,
132
],
[
132,
133
],
[
132,
134
],
[
116,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
136,
141
],
[
135,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
146,
147
],
[
116,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
148,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
148,
158
],
[
158,
159
],
[
159,
160
],
[
148,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
164,
167
],
[
163,
168
],
[
162,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
175,
176
],
[
176,
177
],
[
169,
178
],
[
178,
179
],
[
178,
180
],
[
169,
181
],
[
181,
182
],
[
181,
183
],
[
162,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
189,
190
],
[
188,
191
],
[
184,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
194,
196
],
[
116,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
203,
204
],
[
204,
205
],
[
199,
206
],
[
116,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
210,
214
],
[
114,
215
],
[
215,
216
],
[
0,
217
],
[
217,
218
],
[
217,
219
]
]
| [
"\nimport java.io.*;\nimport java.lang.reflect.Array;\nimport java.util.*;\n\n/*\n><BY MOHAMMAD OMAR><GOOGLE, HERE I COME><\n*/\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n int T = sc.nextInt();\n int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);\n pw.println(ans);\n pw.close();\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n\n public double nextDouble(String x) {\n\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }\n for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg ? -1 : 1);\n }\n\n\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n int T = sc.nextInt();\n int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);\n pw.println(ans);\n pw.close();\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n\n public double nextDouble(String x) {\n\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }\n for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg ? -1 : 1);\n }\n\n\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n int T = sc.nextInt();\n int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);\n pw.println(ans);\n pw.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n int T = sc.nextInt();\n int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);\n pw.println(ans);\n pw.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"int T = sc.nextInt();",
"T",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);",
"ans",
"(T % 1000 == 0) ? 0 : (1000 - T % 1000)",
"(T % 1000 == 0)",
"T % 1000",
"T",
"1000",
"0",
"0",
"(1000 - T % 1000)",
"1000",
"T % 1000",
"T",
"1000",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n\n public double nextDouble(String x) {\n\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }\n for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg ? -1 : 1);\n }\n\n\n }",
"Scanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }",
"Scanner",
"{\n br = new BufferedReader(new InputStreamReader(s));\n }",
"br = new BufferedReader(new InputStreamReader(s))",
"br",
"new BufferedReader(new InputStreamReader(s))",
"InputStream s",
"s",
"public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() throws IOException {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public String nextLine() throws IOException {\n return br.readLine();\n }",
"nextLine",
"{\n return br.readLine();\n }",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"public boolean ready() throws IOException {\n return br.ready();\n }",
"ready",
"{\n return br.ready();\n }",
"return br.ready();",
"br.ready()",
"br.ready",
"br",
"public double nextDouble(String x) {\n\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }\n for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg ? -1 : 1);\n }",
"nextDouble",
"{\n\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }\n for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg ? -1 : 1);\n }",
"StringBuilder sb = new StringBuilder(\"0\");",
"sb",
"new StringBuilder(\"0\")",
"double res = 0",
"res",
"0",
"f = 1;",
"f",
"1",
"boolean dec = false",
"dec",
"false",
"neg = false;",
"neg",
"false",
"int start = 0;",
"start",
"0",
"if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }",
"x.charAt(0) == '-'",
"x.charAt(0)",
"x.charAt",
"x",
"0",
"'-'",
"{\n neg = true;\n start++;\n }",
"neg = true",
"neg",
"true",
"start++",
"start",
"for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }",
"int i = start;",
"int i = start;",
"i",
"start",
"i < x.length()",
"i",
"x.length()",
"x.length",
"x",
"i++",
"i++",
"i",
"if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }",
"if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }",
"x.charAt(i) == '.'",
"x.charAt(i)",
"x.charAt",
"x",
"i",
"'.'",
"{\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }",
"res = Long.parseLong(sb.toString())",
"res",
"Long.parseLong(sb.toString())",
"Long.parseLong",
"Long",
"sb.toString()",
"sb.toString",
"sb",
"sb = new StringBuilder(\"0\")",
"sb",
"new StringBuilder(\"0\")",
"dec = true",
"dec",
"true",
"{\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }",
"sb.append(x.charAt(i))",
"sb.append",
"sb",
"x.charAt(i)",
"x.charAt",
"x",
"i",
"if (dec)\n f *= 10;",
"dec",
"f *= 10",
"f",
"10",
"res += Long.parseLong(sb.toString()) / f",
"res",
"Long.parseLong(sb.toString()) / f",
"Long.parseLong(sb.toString())",
"Long.parseLong",
"Long",
"sb.toString()",
"sb.toString",
"sb",
"f",
"return res * (neg ? -1 : 1);",
"res * (neg ? -1 : 1)",
"res",
"(neg ? -1 : 1)",
"neg",
"-1",
"1",
"1",
"String x",
"x",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n int T = sc.nextInt();\n int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);\n pw.println(ans);\n pw.close();\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n\n public double nextDouble(String x) {\n\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }\n for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg ? -1 : 1);\n }\n\n\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n int T = sc.nextInt();\n int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);\n pw.println(ans);\n pw.close();\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n\n public double nextDouble(String x) {\n\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if (x.charAt(0) == '-') {\n neg = true;\n start++;\n }\n for (int i = start; i < x.length(); i++)\n if (x.charAt(i) == '.') {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n } else {\n sb.append(x.charAt(i));\n if (dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg ? -1 : 1);\n }\n\n\n }\n}",
"Main"
]
|
import java.io.*;
import java.lang.reflect.Array;
import java.util.*;
/*
><BY MOHAMMAD OMAR><GOOGLE, HERE I COME><
*/
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
int T = sc.nextInt();
int ans = (T % 1000 == 0) ? 0 : (1000 - T % 1000);
pw.println(ans);
pw.close();
}
static class Scanner {
StringTokenizer st;
BufferedReader br;
public Scanner(InputStream s) {
br = new BufferedReader(new InputStreamReader(s));
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
public long nextLong() throws IOException {
return Long.parseLong(next());
}
public String nextLine() throws IOException {
return br.readLine();
}
public boolean ready() throws IOException {
return br.ready();
}
public double nextDouble(String x) {
StringBuilder sb = new StringBuilder("0");
double res = 0, f = 1;
boolean dec = false, neg = false;
int start = 0;
if (x.charAt(0) == '-') {
neg = true;
start++;
}
for (int i = start; i < x.length(); i++)
if (x.charAt(i) == '.') {
res = Long.parseLong(sb.toString());
sb = new StringBuilder("0");
dec = true;
} else {
sb.append(x.charAt(i));
if (dec)
f *= 10;
}
res += Long.parseLong(sb.toString()) / f;
return res * (neg ? -1 : 1);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
17,
4,
18,
18,
13,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
17,
2,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
48,
8
],
[
48,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
9,
45
],
[
45,
46
],
[
0,
47
],
[
47,
48
],
[
47,
49
]
]
| [
"//'main' method must be in a class 'Rextester'.\n//openjdk version '11.0.5' \n\nimport java.util.*;\nimport java.lang.*;\n\npublic class Main\n{ \n public static void main(String args[])\n {\n Scanner s = new Scanner(System.in);\n int x =s.nextInt();\n if(x%1000==0)\n System.out.println(x%1000);\n else{\n System.out.println(1000-x%1000);\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main\n{ \n public static void main(String args[])\n {\n Scanner s = new Scanner(System.in);\n int x =s.nextInt();\n if(x%1000==0)\n System.out.println(x%1000);\n else{\n System.out.println(1000-x%1000);\n }\n }\n}",
"Main",
"public static void main(String args[])\n {\n Scanner s = new Scanner(System.in);\n int x =s.nextInt();\n if(x%1000==0)\n System.out.println(x%1000);\n else{\n System.out.println(1000-x%1000);\n }\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int x =s.nextInt();\n if(x%1000==0)\n System.out.println(x%1000);\n else{\n System.out.println(1000-x%1000);\n }\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int x =s.nextInt();",
"x",
"s.nextInt()",
"s.nextInt",
"s",
"if(x%1000==0)\n System.out.println(x%1000);\n else{\n System.out.println(1000-x%1000);\n }",
"x%1000==0",
"x%1000",
"x",
"1000",
"0",
"System.out.println(x%1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"x%1000",
"x",
"1000",
"{\n System.out.println(1000-x%1000);\n }",
"System.out.println(1000-x%1000)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-x%1000",
"1000",
"x%1000",
"x",
"1000",
"String args[]",
"args",
"public class Main\n{ \n public static void main(String args[])\n {\n Scanner s = new Scanner(System.in);\n int x =s.nextInt();\n if(x%1000==0)\n System.out.println(x%1000);\n else{\n System.out.println(1000-x%1000);\n }\n }\n}",
"public class Main\n{ \n public static void main(String args[])\n {\n Scanner s = new Scanner(System.in);\n int x =s.nextInt();\n if(x%1000==0)\n System.out.println(x%1000);\n else{\n System.out.println(1000-x%1000);\n }\n }\n}",
"Main"
]
| //'main' method must be in a class 'Rextester'.
//openjdk version '11.0.5'
import java.util.*;
import java.lang.*;
public class Main
{
public static void main(String args[])
{
Scanner s = new Scanner(System.in);
int x =s.nextInt();
if(x%1000==0)
System.out.println(x%1000);
else{
System.out.println(1000-x%1000);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
41,
13,
2,
13,
17,
41,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
17,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
30,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
6,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint a=n/1000;\n\t\tint b=n%1000;\n\t\tint c=0;\n\t\tif(b==0) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(1000-b);\n\t\t}\n\t}\n\t\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint a=n/1000;\n\t\tint b=n%1000;\n\t\tint c=0;\n\t\tif(b==0) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(1000-b);\n\t\t}\n\t}\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint a=n/1000;\n\t\tint b=n%1000;\n\t\tint c=0;\n\t\tif(b==0) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(1000-b);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint a=n/1000;\n\t\tint b=n%1000;\n\t\tint c=0;\n\t\tif(b==0) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(1000-b);\n\t\t}\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a=n/1000;",
"a",
"n/1000",
"n",
"1000",
"int b=n%1000;",
"b",
"n%1000",
"n",
"1000",
"int c=0;",
"c",
"0",
"if(b==0) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(1000-b);\n\t\t}",
"b==0",
"b",
"0",
"{\n\t\t\tSystem.out.println(c);\n\t\t}",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"{\n\t\t\tSystem.out.println(1000-b);\n\t\t}",
"System.out.println(1000-b)",
"System.out.println",
"System.out",
"System",
"System.out",
"1000-b",
"1000",
"b",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint a=n/1000;\n\t\tint b=n%1000;\n\t\tint c=0;\n\t\tif(b==0) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(1000-b);\n\t\t}\n\t}\n\t\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint a=n/1000;\n\t\tint b=n%1000;\n\t\tint c=0;\n\t\tif(b==0) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(1000-b);\n\t\t}\n\t}\n\t\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int a=n/1000;
int b=n%1000;
int c=0;
if(b==0) {
System.out.println(c);
}
else {
System.out.println(1000-b);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
17,
0,
13,
2,
13,
40,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
42,
5
],
[
42,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
6,
39
],
[
39,
40
],
[
0,
41
],
[
41,
42
],
[
41,
43
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\twhile(a>0) {\n\t\t\ta=a-1000;\n\t\t};\n\t\ta=a*-1;\n System.out.println(a);\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\twhile(a>0) {\n\t\t\ta=a-1000;\n\t\t};\n\t\ta=a*-1;\n System.out.println(a);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\twhile(a>0) {\n\t\t\ta=a-1000;\n\t\t};\n\t\ta=a*-1;\n System.out.println(a);\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\twhile(a>0) {\n\t\t\ta=a-1000;\n\t\t};\n\t\ta=a*-1;\n System.out.println(a);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"while(a>0) {\n\t\t\ta=a-1000;\n\t\t}",
"a>0",
"a",
"0",
"{\n\t\t\ta=a-1000;\n\t\t}",
"a=a-1000",
"a",
"a-1000",
"a",
"1000",
"a=a*-1",
"a",
"a*-1",
"a",
"-1",
"1",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\twhile(a>0) {\n\t\t\ta=a-1000;\n\t\t};\n\t\ta=a*-1;\n System.out.println(a);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\twhile(a>0) {\n\t\t\ta=a-1000;\n\t\t};\n\t\ta=a*-1;\n System.out.println(a);\n\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
while(a>0) {
a=a-1000;
};
a=a*-1;
System.out.println(a);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
14,
2,
2,
13,
17,
17,
0,
13,
17,
0,
13,
2,
17,
2,
13,
17,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
47,
5
],
[
47,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
19,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
6,
44
],
[
44,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint change;\n\t\tif (n % 1000 == 0) change = 0;\n\t\telse change = 1000 - (n % 1000);\n\t\t\n\t\tSystem.out.println(change);\n\t\t\n\t\tsc.close();\n\t}\n\t\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint change;\n\t\tif (n % 1000 == 0) change = 0;\n\t\telse change = 1000 - (n % 1000);\n\t\t\n\t\tSystem.out.println(change);\n\t\t\n\t\tsc.close();\n\t}\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint change;\n\t\tif (n % 1000 == 0) change = 0;\n\t\telse change = 1000 - (n % 1000);\n\t\t\n\t\tSystem.out.println(change);\n\t\t\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint change;\n\t\tif (n % 1000 == 0) change = 0;\n\t\telse change = 1000 - (n % 1000);\n\t\t\n\t\tSystem.out.println(change);\n\t\t\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int change;",
"change",
"if (n % 1000 == 0) change = 0;\n\t\telse change = 1000 - (n % 1000);",
"n % 1000 == 0",
"n % 1000",
"n",
"1000",
"0",
"change = 0",
"change",
"0",
"change = 1000 - (n % 1000)",
"change",
"1000 - (n % 1000)",
"1000",
"(n % 1000)",
"n",
"1000",
"System.out.println(change)",
"System.out.println",
"System.out",
"System",
"System.out",
"change",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint change;\n\t\tif (n % 1000 == 0) change = 0;\n\t\telse change = 1000 - (n % 1000);\n\t\t\n\t\tSystem.out.println(change);\n\t\t\n\t\tsc.close();\n\t}\n\t\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint change;\n\t\tif (n % 1000 == 0) change = 0;\n\t\telse change = 1000 - (n % 1000);\n\t\t\n\t\tSystem.out.println(change);\n\t\t\n\t\tsc.close();\n\t}\n\t\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int change;
if (n % 1000 == 0) change = 0;
else change = 1000 - (n % 1000);
System.out.println(change);
sc.close();
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.