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,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
13,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
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,
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,
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,
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,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
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,
11,
1,
41,
13,
17,
41,
13,
18,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
2,
13,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
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,
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,
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,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
480,
8
],
[
480,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
29,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
29,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
52,
56
],
[
29,
57
],
[
57,
58
],
[
57,
59
],
[
29,
60
],
[
60,
61
],
[
60,
62
],
[
29,
63
],
[
63,
64
],
[
63,
65
],
[
29,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
29,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
85,
89
],
[
29,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
11,
94
],
[
94,
95
],
[
95,
96
],
[
9,
97
],
[
97,
98
],
[
480,
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
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
111,
119
],
[
119,
120
],
[
99,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
124,
129
],
[
129,
130
],
[
123,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
139,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
135,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
156,
157
],
[
157,
158
],
[
123,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
99,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
166,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
171,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
166,
180
],
[
180,
181
],
[
180,
182
],
[
166,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
187,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
166,
196
],
[
196,
197
],
[
196,
198
],
[
166,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
199,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
204,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
210,
212
],
[
204,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
166,
217
],
[
217,
218
],
[
218,
219
],
[
218,
220
],
[
99,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
223,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
223,
237
],
[
237,
238
],
[
237,
239
],
[
223,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
244,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
223,
253
],
[
253,
254
],
[
253,
255
],
[
223,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
256,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
261,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
267,
269
],
[
261,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
223,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
99,
278
],
[
278,
279
],
[
278,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
285,
290
],
[
290,
291
],
[
290,
292
],
[
285,
293
],
[
293,
294
],
[
294,
295
],
[
285,
296
],
[
297,
297
],
[
297,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
298,
302
],
[
302,
303
],
[
280,
304
],
[
304,
305
],
[
278,
306
],
[
306,
307
],
[
99,
308
],
[
308,
309
],
[
308,
310
],
[
310,
311
],
[
311,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
312,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
318,
320
],
[
311,
321
],
[
321,
322
],
[
321,
323
],
[
311,
324
],
[
324,
325
],
[
325,
326
],
[
311,
327
],
[
328,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
332,
335
],
[
335,
336
],
[
335,
337
],
[
331,
338
],
[
328,
339
],
[
339,
340
],
[
339,
341
],
[
341,
342
],
[
341,
343
],
[
328,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
344,
348
],
[
348,
349
],
[
348,
350
],
[
328,
351
],
[
351,
352
],
[
352,
353
],
[
352,
354
],
[
351,
355
],
[
310,
356
],
[
356,
357
],
[
308,
358
],
[
358,
359
],
[
308,
360
],
[
360,
361
],
[
99,
362
],
[
362,
363
],
[
362,
364
],
[
364,
365
],
[
365,
366
],
[
365,
367
],
[
367,
368
],
[
364,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
369,
373
],
[
373,
374
],
[
374,
375
],
[
374,
376
],
[
376,
377
],
[
364,
378
],
[
378,
379
],
[
378,
380
],
[
364,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
383,
385
],
[
381,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
387,
390
],
[
386,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
364,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
99,
399
],
[
399,
400
],
[
399,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
404,
405
],
[
401,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
406,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
401,
414
],
[
414,
415
],
[
414,
416
],
[
401,
417
],
[
417,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
417,
422
],
[
422,
423
],
[
423,
424
],
[
424,
425
],
[
423,
426
],
[
422,
427
],
[
427,
428
],
[
427,
429
],
[
429,
430
],
[
401,
431
],
[
431,
432
],
[
432,
433
],
[
433,
434
],
[
99,
435
],
[
435,
436
],
[
435,
437
],
[
437,
438
],
[
438,
439
],
[
442,
440
],
[
452,
441
],
[
449,
442
],
[
442,
443
],
[
443,
444
],
[
443,
445
],
[
442,
446
],
[
446,
447
],
[
446,
448
],
[
449,
449
],
[
449,
450
],
[
449,
451
],
[
452,
452
],
[
452,
453
],
[
452,
454
],
[
442,
455
],
[
455,
456
],
[
455,
457
],
[
457,
458
],
[
435,
459
],
[
459,
460
],
[
99,
461
],
[
461,
462
],
[
461,
463
],
[
463,
464
],
[
464,
465
],
[
466,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
466,
470
],
[
470,
471
],
[
470,
472
],
[
466,
473
],
[
473,
474
],
[
473,
475
],
[
475,
476
],
[
461,
477
],
[
477,
478
],
[
0,
479
],
[
479,
480
],
[
479,
481
]
] |
[
"import java.io.*;\nimport java.util.*;\npublic class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\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 res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\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 long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\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 res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\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 long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"Main",
"public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }\n pw.close();\n\n }",
"main",
"{\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }\n pw.close();\n\n }",
"InputReader sc = new InputReader(System.in);",
"sc",
"new InputReader(System.in)",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"Random gen = new Random();",
"gen",
"new Random()",
"int test = 1;",
"test",
"1",
"while(test-->0) {\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }",
"test-->0",
"test--",
"test",
"0",
"{\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int min = Math.min(a,k);",
"min",
"Math.min(a,k)",
"Math.min",
"Math",
"a",
"k",
"int ans = min;",
"ans",
"min",
"a-=min",
"a",
"min",
"k-=min",
"k",
"min",
"if(k>0)\n {\n k-=Math.min(k,b);\n }",
"k>0",
"k",
"0",
"{\n k-=Math.min(k,b);\n }",
"k-=Math.min(k,b)",
"k",
"Math.min(k,b)",
"Math.min",
"Math",
"k",
"b",
"if(k>0)\n {\n ans-=Math.min(k,c);\n }",
"k>0",
"k",
"0",
"{\n ans-=Math.min(k,c);\n }",
"ans-=Math.min(k,c)",
"ans",
"Math.min(k,c)",
"Math.min",
"Math",
"k",
"c",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\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 res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\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 long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }",
"InputReader",
"private final InputStream stream;",
"stream",
"private final byte[] buf = new byte[8192];",
"buf",
"new byte[8192]",
"8192",
"private int curChar",
"curChar",
"snumChars;",
"snumChars",
"public InputReader(InputStream st) {\n this.stream = st;\n }",
"InputReader",
"{\n this.stream = st;\n }",
"this.stream = st",
"this.stream",
"this",
"this.stream",
"st",
"InputStream st",
"st",
"public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"read",
"{\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (snumChars == -1)\n throw new InputMismatchException();",
"snumChars == -1",
"snumChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar >= snumChars",
"curChar",
"snumChars",
"{\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n snumChars = 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 snumChars = stream.read(buf);\n }",
"snumChars = stream.read(buf)",
"snumChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (snumChars <= 0)\n return -1;",
"snumChars <= 0",
"snumChars",
"0",
"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 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 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 res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res *= 10;\n res += c - '0';\n c = read();\n }",
"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 nextLong() {\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 long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextLong",
"{\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 long res = 0;\n do {\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",
"long res = 0;",
"res",
"0",
"do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res *= 10;\n res += c - '0';\n c = read();\n }",
"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 int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"nextIntArray",
"{\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\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();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nextInt();\n }",
"{\n a[i] = nextInt();\n }",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }",
"shuffle",
"{ for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }",
"for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"int i = 0, n = a.length;",
"int i = 0",
"i",
"0",
"n = a.length;",
"n",
"a.length",
"a",
"a.length",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{ int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"{ int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"int ind = gen.nextInt(n-i)+i;",
"ind",
"gen.nextInt(n-i)+i",
"gen.nextInt(n-i)",
"gen.nextInt",
"gen",
"n-i",
"n",
"i",
"i",
"int d = a[i];",
"d",
"a[i]",
"a",
"i",
"a[i] = a[ind]",
"a[i]",
"a",
"i",
"a[ind]",
"a",
"ind",
"a[ind] = d",
"a[ind]",
"a",
"ind",
"d",
"return a;",
"a",
"int[] a",
"a",
"Random gen",
"gen",
"public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"readString",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\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",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"nextLine",
"{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));",
"!isEndOfLine(c)",
"isEndOfLine(c)",
"isEndOfLine",
"c",
"{\n res.appendCodePoint(c);\n c = 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 return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\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",
"private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"isEndOfLine",
"{\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"return c == '\\n' || c == '\\r' || c == -1;",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\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 res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\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 long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int min = Math.min(a,k);\n int ans = min;\n a-=min;\n k-=min;\n if(k>0)\n {\n k-=Math.min(k,b);\n }\n if(k>0)\n {\n ans-=Math.min(k,c);\n }\n pw.println(ans);\n }\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\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 res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\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 long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
InputReader sc = new InputReader(System.in);
PrintWriter pw = new PrintWriter(System.out);
Random gen = new Random();
int test = 1;//sc.nextInt();
while(test-->0) {
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int min = Math.min(a,k);
int ans = min;
a-=min;
k-=min;
if(k>0)
{
k-=Math.min(k,b);
}
if(k>0)
{
ans-=Math.min(k,c);
}
pw.println(ans);
}
pw.close();
}
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
public InputReader(InputStream st) {
this.stream = st;
}
public int read() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 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 {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int [] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public static int[] shuffle(int[] a, Random gen)
{ for(int i = 0, n = a.length;i < n;i++)
{ int ind = gen.nextInt(n-i)+i;
int d = a[i];
a[i] = a[ind];
a[ind] = d;
}
return a;
}
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 String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
0,
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
],
[
70,
5
],
[
70,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
39,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
35,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
6,
67
],
[
67,
68
],
[
0,
69
],
[
69,
70
],
[
69,
71
]
] |
[
"import java.util.*;\npublic class Main { \n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n long o=0;\n long x=sc.nextLong();\n long y=sc.nextLong();\n \tlong z=sc.nextLong();\n long a=sc.nextLong();\n \tif(a>x){\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }else{\n o=a;\n \t \t\n }\n \n System.out.println(o);\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 long o=0;\n long x=sc.nextLong();\n long y=sc.nextLong();\n \tlong z=sc.nextLong();\n long a=sc.nextLong();\n \tif(a>x){\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }else{\n o=a;\n \t \t\n }\n \n System.out.println(o);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n long o=0;\n long x=sc.nextLong();\n long y=sc.nextLong();\n \tlong z=sc.nextLong();\n long a=sc.nextLong();\n \tif(a>x){\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }else{\n o=a;\n \t \t\n }\n \n System.out.println(o);\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n long o=0;\n long x=sc.nextLong();\n long y=sc.nextLong();\n \tlong z=sc.nextLong();\n long a=sc.nextLong();\n \tif(a>x){\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }else{\n o=a;\n \t \t\n }\n \n System.out.println(o);\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long o=0;",
"o",
"0",
"long x=sc.nextLong();",
"x",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long y=sc.nextLong();",
"y",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long z=sc.nextLong();",
"z",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long a=sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"if(a>x){\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }else{\n o=a;\n \t \t\n }",
"a>x",
"a",
"x",
"{\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }",
"o+=x",
"o",
"x",
"a-=x",
"a",
"x",
"a-=y",
"a",
"y",
"if(a>0){\n \to-=a;\n }",
"a>0",
"a",
"0",
"{\n \to-=a;\n }",
"o-=a",
"o",
"a",
"{\n o=a;\n \t \t\n }",
"o=a",
"o",
"a",
"System.out.println(o)",
"System.out.println",
"System.out",
"System",
"System.out",
"o",
"String[] args",
"args",
"public class Main { \n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n long o=0;\n long x=sc.nextLong();\n long y=sc.nextLong();\n \tlong z=sc.nextLong();\n long a=sc.nextLong();\n \tif(a>x){\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }else{\n o=a;\n \t \t\n }\n \n System.out.println(o);\n }\n}",
"public class Main { \n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n long o=0;\n long x=sc.nextLong();\n long y=sc.nextLong();\n \tlong z=sc.nextLong();\n long a=sc.nextLong();\n \tif(a>x){\n \to+=x; \n \ta-=x;\n \ta-=y;\n if(a>0){\n \to-=a;\n }\n }else{\n o=a;\n \t \t\n }\n \n System.out.println(o);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
long o=0;
long x=sc.nextLong();
long y=sc.nextLong();
long z=sc.nextLong();
long a=sc.nextLong();
if(a>x){
o+=x;
a-=x;
a-=y;
if(a>0){
o-=a;
}
}else{
o=a;
}
System.out.println(o);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\nScanner scan = new Scanner(System.in);\n\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tlong k = scan.nextLong();\n\n\t\tlong re = 0L;\n\n\t\tif(k <= a) {\n\t\t\tre = k;\n\t\t\t}else if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}\n\t\tSystem.out.println(re);\n\t\tscan.close();\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\nScanner scan = new Scanner(System.in);\n\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tlong k = scan.nextLong();\n\n\t\tlong re = 0L;\n\n\t\tif(k <= a) {\n\t\t\tre = k;\n\t\t\t}else if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}\n\t\tSystem.out.println(re);\n\t\tscan.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\nScanner scan = new Scanner(System.in);\n\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tlong k = scan.nextLong();\n\n\t\tlong re = 0L;\n\n\t\tif(k <= a) {\n\t\t\tre = k;\n\t\t\t}else if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}\n\t\tSystem.out.println(re);\n\t\tscan.close();\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\nScanner scan = new Scanner(System.in);\n\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tlong k = scan.nextLong();\n\n\t\tlong re = 0L;\n\n\t\tif(k <= a) {\n\t\t\tre = k;\n\t\t\t}else if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}\n\t\tSystem.out.println(re);\n\t\tscan.close();\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int c = scan.nextInt();",
"c",
"scan.nextInt()",
"scan.nextInt",
"scan",
"long k = scan.nextLong();",
"k",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long re = 0L;",
"re",
"0L",
"if(k <= a) {\n\t\t\tre = k;\n\t\t\t}else if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}",
"k <= a",
"k",
"a",
"{\n\t\t\tre = k;\n\t\t\t}",
"re = k",
"re",
"k",
"if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}",
"k <= (a+b)",
"k",
"(a+b)",
"a",
"b",
"{\n\tre = a;\n\t\t\t}",
"re = a",
"re",
"a",
"{\n\tre = a-(k-a-b);\n\t\t\t}",
"re = a-(k-a-b)",
"re",
"a-(k-a-b)",
"a",
"(k-a-b)",
"k-a-b",
"k",
"a",
"b",
"System.out.println(re)",
"System.out.println",
"System.out",
"System",
"System.out",
"re",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\nScanner scan = new Scanner(System.in);\n\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tlong k = scan.nextLong();\n\n\t\tlong re = 0L;\n\n\t\tif(k <= a) {\n\t\t\tre = k;\n\t\t\t}else if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}\n\t\tSystem.out.println(re);\n\t\tscan.close();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\nScanner scan = new Scanner(System.in);\n\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tlong k = scan.nextLong();\n\n\t\tlong re = 0L;\n\n\t\tif(k <= a) {\n\t\t\tre = k;\n\t\t\t}else if(k <= (a+b)) {\n\tre = a;\n\t\t\t}else {\n\tre = a-(k-a-b);\n\t\t\t}\n\t\tSystem.out.println(re);\n\t\tscan.close();\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
long k = scan.nextLong();
long re = 0L;
if(k <= a) {
re = k;
}else if(k <= (a+b)) {
re = a;
}else {
re = a-(k-a-b);
}
System.out.println(re);
scan.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
13,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
4,
13,
40,
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
],
[
96,
11
],
[
96,
12
],
[
12,
13
],
[
12,
14
],
[
96,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
17,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
17,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
49,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
49,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
66,
66
],
[
66,
67
],
[
66,
68
],
[
66,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
96,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
78,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] |
[
"/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int a =in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n \n if(a>=k)\n {\n System.out.println(k);\n }\n else if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }\n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t//\tin.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\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 static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int a =in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n \n if(a>=k)\n {\n System.out.println(k);\n }\n else if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }\n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t//\tin.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}",
"Main",
"static Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"public static void solve()\n {\n int a =in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n \n if(a>=k)\n {\n System.out.println(k);\n }\n else if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }\n }",
"solve",
"{\n int a =in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n \n if(a>=k)\n {\n System.out.println(k);\n }\n else if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }\n }",
"int a =in.nextInt()",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"b=in.nextInt()",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"c=in.nextInt()",
"c",
"in.nextInt()",
"in.nextInt",
"in",
"k=in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"if(a>=k)\n {\n System.out.println(k);\n }\n else if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }",
"a>=k",
"a",
"k",
"{\n System.out.println(k);\n }",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }",
"a+b>=k",
"a+b",
"a",
"b",
"k",
"{\n System.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"{\n \n k=k-a-b;\n System.out.println(a-(k));\n }",
"k=k-a-b",
"k",
"k-a-b",
"k-a-b",
"k",
"a",
"b",
"System.out.println(a-(k))",
"System.out.println",
"System.out",
"System",
"System.out",
"a-(k)",
"a",
"(k)",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t//\tin.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}",
"main",
"{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t//\tin.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}",
"int t=1;",
"t",
"1",
"while(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}",
"t>0",
"t",
"0",
"{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}",
"solve()",
"solve",
"t--",
"t",
"String[] args",
"args",
"public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int a =in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n \n if(a>=k)\n {\n System.out.println(k);\n }\n else if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }\n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t//\tin.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}",
"public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n int a =in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();\n \n if(a>=k)\n {\n System.out.println(k);\n }\n else if(a+b>=k)\n {\n System.out.println(a);\n }\n else\n {\n \n k=k-a-b;\n System.out.println(a-(k));\n }\n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t//\tin.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}",
"Main"
] |
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
static Scanner in = new Scanner(System.in);
public static void solve()
{
int a =in.nextInt(),b=in.nextInt(),c=in.nextInt(),k=in.nextInt();
if(a>=k)
{
System.out.println(k);
}
else if(a+b>=k)
{
System.out.println(a);
}
else
{
k=k-a-b;
System.out.println(a-(k));
}
}
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
int t=1;
// in.nextLine();
while(t>0)
{
solve();
t--;
}
// System.out.println(x);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
40,
13,
40,
13,
14,
2,
13,
17,
30,
40,
13,
30,
40,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
78,
5
],
[
78,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
48,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
57,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
6,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int max = 0;\n \n for(int i=0; i<k; i++){\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }\n System.out.println(max);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int max = 0;\n \n for(int i=0; i<k; i++){\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }\n System.out.println(max);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int max = 0;\n \n for(int i=0; i<k; i++){\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }\n System.out.println(max);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int max = 0;\n \n for(int i=0; i<k; i++){\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }\n System.out.println(max);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int max = 0;",
"max",
"0",
"for(int i=0; i<k; i++){\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }",
"{\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }",
"if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }",
"a > 0",
"a",
"0",
"{\n max++;\n a--;\n }",
"max++",
"max",
"a--",
"a",
"if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }",
"b > 0",
"b",
"0",
"{\n b--;\n }",
"b--",
"b",
"{\n max--;\n c--;\n }",
"max--",
"max",
"c--",
"c",
"System.out.println(max)",
"System.out.println",
"System.out",
"System",
"System.out",
"max",
"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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int max = 0;\n \n for(int i=0; i<k; i++){\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }\n System.out.println(max);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int max = 0;\n \n for(int i=0; i<k; i++){\n if(a > 0){\n max++;\n a--;\n }\n else if(b > 0){\n b--;\n }\n else{\n max--;\n c--;\n }\n }\n System.out.println(max);\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();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int max = 0;
for(int i=0; i<k; i++){
if(a > 0){
max++;
a--;
}
else if(b > 0){
b--;
}
else{
max--;
c--;
}
}
System.out.println(max);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
13,
2,
2,
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
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
32,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
42,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
42,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
6,
66
],
[
66,
67
],
[
0,
68
],
[
68,
69
],
[
68,
70
]
] |
[
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=sc.nextLong();\n long k=sc.nextLong();\n \tif(k<=a)System.out.println(k);\n else if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));\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 long a=sc.nextLong();\n long b=sc.nextLong();\n long c=sc.nextLong();\n long k=sc.nextLong();\n \tif(k<=a)System.out.println(k);\n else if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=sc.nextLong();\n long k=sc.nextLong();\n \tif(k<=a)System.out.println(k);\n else if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=sc.nextLong();\n long k=sc.nextLong();\n \tif(k<=a)System.out.println(k);\n else if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long a=sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b=sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long c=sc.nextLong();",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long k=sc.nextLong();",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"if(k<=a)System.out.println(k);\n else if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));",
"k<=a",
"k",
"a",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));",
"k<=a+b",
"k",
"a+b",
"a",
"b",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"System.out.println(a-(k-a-b))",
"System.out.println",
"System.out",
"System",
"System.out",
"a-(k-a-b)",
"a",
"(k-a-b)",
"k-a-b",
"k",
"a",
"b",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=sc.nextLong();\n long k=sc.nextLong();\n \tif(k<=a)System.out.println(k);\n else if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=sc.nextLong();\n long k=sc.nextLong();\n \tif(k<=a)System.out.println(k);\n else if(k<=a+b)System.out.println(a);\n else System.out.println(a-(k-a-b));\n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
long a=sc.nextLong();
long b=sc.nextLong();
long c=sc.nextLong();
long k=sc.nextLong();
if(k<=a)System.out.println(k);
else if(k<=a+b)System.out.println(a);
else System.out.println(a-(k-a-b));
}
}
|
[
7,
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,
4,
18,
13,
42,
2,
13,
17,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
2,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
13,
4,
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
],
[
131,
11
],
[
131,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
14,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
14,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
45,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
57,
59
],
[
14,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
65,
67
],
[
14,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
14,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
14,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
84,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
95,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
123,
127
],
[
12,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n ArrayList<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n mylist.add(strinput);\n strinput = reader.readLine();\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n\n int a = Integer.valueOf(arr01[0]);\n int b = Integer.valueOf(arr01[1]);\n int c = Integer.valueOf(arr01[2]);\n int k = Integer.valueOf(arr01[3]);\n\n if (a >= k) {\n System.out.println(k);\n } else if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }\n\n }\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n ArrayList<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n mylist.add(strinput);\n strinput = reader.readLine();\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n\n int a = Integer.valueOf(arr01[0]);\n int b = Integer.valueOf(arr01[1]);\n int c = Integer.valueOf(arr01[2]);\n int k = Integer.valueOf(arr01[3]);\n\n if (a >= k) {\n System.out.println(k);\n } else if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }\n\n }\n\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n ArrayList<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n mylist.add(strinput);\n strinput = reader.readLine();\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n\n int a = Integer.valueOf(arr01[0]);\n int b = Integer.valueOf(arr01[1]);\n int c = Integer.valueOf(arr01[2]);\n int k = Integer.valueOf(arr01[3]);\n\n if (a >= k) {\n System.out.println(k);\n } else if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }\n\n }",
"main",
"{\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n ArrayList<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n mylist.add(strinput);\n strinput = reader.readLine();\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n\n int a = Integer.valueOf(arr01[0]);\n int b = Integer.valueOf(arr01[1]);\n int c = Integer.valueOf(arr01[2]);\n int k = Integer.valueOf(arr01[3]);\n\n if (a >= k) {\n System.out.println(k);\n } else if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }\n\n }",
"InputStreamReader is = new InputStreamReader(System.in);",
"is",
"new InputStreamReader(System.in)",
"BufferedReader reader = new BufferedReader(is);",
"reader",
"new BufferedReader(is)",
"ArrayList<String> mylist = new ArrayList<>();",
"mylist",
"new ArrayList<>()",
"String strinput = reader.readLine();",
"strinput",
"reader.readLine()",
"reader.readLine",
"reader",
"while (strinput != null) {\n mylist.add(strinput);\n strinput = reader.readLine();\n }",
"strinput != null",
"strinput",
"null",
"{\n mylist.add(strinput);\n strinput = reader.readLine();\n }",
"mylist.add(strinput)",
"mylist.add",
"mylist",
"strinput",
"strinput = reader.readLine()",
"strinput",
"reader.readLine()",
"reader.readLine",
"reader",
"String arr01[] = mylist.get(0).split(\" \");",
"arr01",
"mylist.get(0).split(\" \")",
"mylist.get(0).split",
"mylist.get(0)",
"mylist.get",
"mylist",
"0",
"\" \"",
"int a = Integer.valueOf(arr01[0]);",
"a",
"Integer.valueOf(arr01[0])",
"Integer.valueOf",
"Integer",
"arr01[0]",
"arr01",
"0",
"int b = Integer.valueOf(arr01[1]);",
"b",
"Integer.valueOf(arr01[1])",
"Integer.valueOf",
"Integer",
"arr01[1]",
"arr01",
"1",
"int c = Integer.valueOf(arr01[2]);",
"c",
"Integer.valueOf(arr01[2])",
"Integer.valueOf",
"Integer",
"arr01[2]",
"arr01",
"2",
"int k = Integer.valueOf(arr01[3]);",
"k",
"Integer.valueOf(arr01[3])",
"Integer.valueOf",
"Integer",
"arr01[3]",
"arr01",
"3",
"if (a >= k) {\n System.out.println(k);\n } else if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }",
"a >= k",
"a",
"k",
"{\n System.out.println(k);\n }",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }",
"a + b >= k",
"a + b",
"a",
"b",
"k",
"{\n System.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"{\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }",
"int nokori = k - (a + b);",
"nokori",
"k - (a + b)",
"k",
"(a + b)",
"a",
"b",
"System.out.println(a - Math.min(c, nokori))",
"System.out.println",
"System.out",
"System",
"System.out",
"a - Math.min(c, nokori)",
"a",
"Math.min(c, nokori)",
"Math.min",
"Math",
"c",
"nokori",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n ArrayList<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n mylist.add(strinput);\n strinput = reader.readLine();\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n\n int a = Integer.valueOf(arr01[0]);\n int b = Integer.valueOf(arr01[1]);\n int c = Integer.valueOf(arr01[2]);\n int k = Integer.valueOf(arr01[3]);\n\n if (a >= k) {\n System.out.println(k);\n } else if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n\n InputStreamReader is = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(is);\n\n ArrayList<String> mylist = new ArrayList<>();\n\n // 標準入力からの値を変数strinputに代入\n String strinput = reader.readLine();\n\n while (strinput != null) {\n mylist.add(strinput);\n strinput = reader.readLine();\n }\n\n String arr01[] = mylist.get(0).split(\" \");\n\n int a = Integer.valueOf(arr01[0]);\n int b = Integer.valueOf(arr01[1]);\n int c = Integer.valueOf(arr01[2]);\n int k = Integer.valueOf(arr01[3]);\n\n if (a >= k) {\n System.out.println(k);\n } else if (a + b >= k) {\n System.out.println(a);\n } else {\n int nokori = k - (a + b);\n System.out.println(a - Math.min(c, nokori));\n\n }\n\n }\n\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) throws Exception {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(is);
ArrayList<String> mylist = new ArrayList<>();
// 標準入力からの値を変数strinputに代入
String strinput = reader.readLine();
while (strinput != null) {
mylist.add(strinput);
strinput = reader.readLine();
}
String arr01[] = mylist.get(0).split(" ");
int a = Integer.valueOf(arr01[0]);
int b = Integer.valueOf(arr01[1]);
int c = Integer.valueOf(arr01[2]);
int k = Integer.valueOf(arr01[3]);
if (a >= k) {
System.out.println(k);
} else if (a + b >= k) {
System.out.println(a);
} else {
int nokori = k - (a + b);
System.out.println(a - Math.min(c, nokori));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
14,
2,
2,
13,
17,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
39,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
35,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
] |
[
"import java.util.*;\n\npublic class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint A= keyboard.nextInt();\n\t\tint B= keyboard.nextInt();\n\t\tint C= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\t\n\t\tint ans =0;\n\t\t\n\t\tif(A<=K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}else{\n\t\t\tans = K;\n\t\t}\n\n\t\tSystem.out.print(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint A= keyboard.nextInt();\n\t\tint B= keyboard.nextInt();\n\t\tint C= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\t\n\t\tint ans =0;\n\t\t\n\t\tif(A<=K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}else{\n\t\t\tans = K;\n\t\t}\n\n\t\tSystem.out.print(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint A= keyboard.nextInt();\n\t\tint B= keyboard.nextInt();\n\t\tint C= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\t\n\t\tint ans =0;\n\t\t\n\t\tif(A<=K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}else{\n\t\t\tans = K;\n\t\t}\n\n\t\tSystem.out.print(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint A= keyboard.nextInt();\n\t\tint B= keyboard.nextInt();\n\t\tint C= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\t\n\t\tint ans =0;\n\t\t\n\t\tif(A<=K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}else{\n\t\t\tans = K;\n\t\t}\n\n\t\tSystem.out.print(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}",
"Scanner keyboard = new Scanner(System.in);",
"keyboard",
"new Scanner(System.in)",
"int A= keyboard.nextInt();",
"A",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int B= keyboard.nextInt();",
"B",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int C= keyboard.nextInt();",
"C",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int K= keyboard.nextInt();",
"K",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int ans =0;",
"ans",
"0",
"if(A<=K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}else{\n\t\t\tans = K;\n\t\t}",
"A<=K",
"A",
"K",
"{\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}",
"ans = A",
"ans",
"A",
"K -= A",
"K",
"A",
"if(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}",
"K!=0 && B<=K",
"K!=0",
"K",
"0",
"B<=K",
"B",
"K",
"{\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}",
"K -= B",
"K",
"B",
"ans -=K",
"ans",
"K",
"{\n\t\t\tans = K;\n\t\t}",
"ans = K",
"ans",
"K",
"System.out.print(ans)",
"System.out.print",
"System.out",
"System",
"System.out",
"ans",
"keyboard.close()",
"keyboard.close",
"keyboard",
"String[] args",
"args",
"public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint A= keyboard.nextInt();\n\t\tint B= keyboard.nextInt();\n\t\tint C= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\t\n\t\tint ans =0;\n\t\t\n\t\tif(A<=K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}else{\n\t\t\tans = K;\n\t\t}\n\n\t\tSystem.out.print(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"public class Main {\npublic static void main(String[] args) {\n\t\t\n\t\tScanner keyboard = new Scanner(System.in); \n\t\t\n\t\tint A= keyboard.nextInt();\n\t\tint B= keyboard.nextInt();\n\t\tint C= keyboard.nextInt();\n\t\tint K= keyboard.nextInt();\n\t\t\n\t\tint ans =0;\n\t\t\n\t\tif(A<=K){\n\t\t\tans = A;\n\t\t\tK -= A;\n\t\t\tif(K!=0 && B<=K){\n\t\t\t\t//ans += 0;\n\t\t\t\tK -= B;\n\t\t\t\tans -=K;\n\t\t\t}\n\t\t}else{\n\t\t\tans = K;\n\t\t}\n\n\t\tSystem.out.print(ans);\n\t\tkeyboard.close();\t\n\t\t\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
int A= keyboard.nextInt();
int B= keyboard.nextInt();
int C= keyboard.nextInt();
int K= keyboard.nextInt();
int ans =0;
if(A<=K){
ans = A;
K -= A;
if(K!=0 && B<=K){
//ans += 0;
K -= B;
ans -=K;
}
}else{
ans = K;
}
System.out.print(ans);
keyboard.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
17,
41,
13,
20,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
18,
13,
13,
17,
30,
0,
13,
2,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
13,
13,
3,
0,
13,
2,
2,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
2,
18,
13,
17,
40,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
141,
5
],
[
141,
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
],
[
22,
25
],
[
22,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
83,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
82,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
105,
111
],
[
8,
112
],
[
112,
113
],
[
112,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
115,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
8,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
6,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
] |
[
"import java.util.*;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tString line1 = scanner.nextLine();\n\t\tscanner.close();\n\t\tString[] linestr =line1.split(\" \",0);\n\t\tlong cards = Long.parseLong(linestr[3]);\n\t\tlong ans = 0;\n\t\tlong[] cardsArr = new long[3];\n\t\tlong[] ansArr = new long[3];\n\t\t\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1;\n\t\tSystem.out.println(ans);\n\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tString line1 = scanner.nextLine();\n\t\tscanner.close();\n\t\tString[] linestr =line1.split(\" \",0);\n\t\tlong cards = Long.parseLong(linestr[3]);\n\t\tlong ans = 0;\n\t\tlong[] cardsArr = new long[3];\n\t\tlong[] ansArr = new long[3];\n\t\t\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1;\n\t\tSystem.out.println(ans);\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tString line1 = scanner.nextLine();\n\t\tscanner.close();\n\t\tString[] linestr =line1.split(\" \",0);\n\t\tlong cards = Long.parseLong(linestr[3]);\n\t\tlong ans = 0;\n\t\tlong[] cardsArr = new long[3];\n\t\tlong[] ansArr = new long[3];\n\t\t\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1;\n\t\tSystem.out.println(ans);\n\n\t}",
"main",
"{\n\t\tScanner scanner =new Scanner(System.in);\n\t\tString line1 = scanner.nextLine();\n\t\tscanner.close();\n\t\tString[] linestr =line1.split(\" \",0);\n\t\tlong cards = Long.parseLong(linestr[3]);\n\t\tlong ans = 0;\n\t\tlong[] cardsArr = new long[3];\n\t\tlong[] ansArr = new long[3];\n\t\t\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1;\n\t\tSystem.out.println(ans);\n\n\t}",
"Scanner scanner =new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String line1 = scanner.nextLine();",
"line1",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"scanner.close()",
"scanner.close",
"scanner",
"String[] linestr =line1.split(\" \",0);",
"linestr",
"line1.split(\" \",0)",
"line1.split",
"line1",
"\" \"",
"0",
"long cards = Long.parseLong(linestr[3]);",
"cards",
"Long.parseLong(linestr[3])",
"Long.parseLong",
"Long",
"linestr[3]",
"linestr",
"3",
"long ans = 0;",
"ans",
"0",
"long[] cardsArr = new long[3];",
"cardsArr",
"new long[3]",
"3",
"long[] ansArr = new long[3];",
"ansArr",
"new long[3]",
"3",
"for (int i = 0; i < 3; i++) {\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 3",
"i",
"3",
"i++",
"i++",
"i",
"{\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}",
"{\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}",
"cardsArr[i] += Long.parseLong(linestr[i])",
"cardsArr[i]",
"cardsArr",
"i",
"Long.parseLong(linestr[i])",
"Long.parseLong",
"Long",
"linestr[i]",
"linestr",
"i",
"for (int i = 0; i < 3; i++) {\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 3",
"i",
"3",
"i++",
"i++",
"i",
"{\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}",
"cards - cardsArr[i] >= 0",
"cards - cardsArr[i]",
"cards",
"cardsArr[i]",
"cardsArr",
"i",
"0",
"{\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t}",
"cards = cards - cardsArr[i]",
"cards",
"cards - cardsArr[i]",
"cards",
"cardsArr[i]",
"cardsArr",
"i",
"ansArr[i] = cardsArr[i]",
"ansArr[i]",
"ansArr",
"i",
"cardsArr[i]",
"cardsArr",
"i",
"{\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}",
"ansArr[i] = cards",
"ansArr[i]",
"ansArr",
"i",
"cards",
"break;",
"ans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1",
"ans",
"ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1",
"ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1",
"ansArr[0] * 1",
"ansArr[0]",
"ansArr",
"0",
"1",
"ansArr[1] * 0",
"ansArr[1]",
"ansArr",
"1",
"0",
"ansArr[2] * -1",
"ansArr[2]",
"ansArr",
"2",
"-1",
"1",
"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\tScanner scanner =new Scanner(System.in);\n\t\tString line1 = scanner.nextLine();\n\t\tscanner.close();\n\t\tString[] linestr =line1.split(\" \",0);\n\t\tlong cards = Long.parseLong(linestr[3]);\n\t\tlong ans = 0;\n\t\tlong[] cardsArr = new long[3];\n\t\tlong[] ansArr = new long[3];\n\t\t\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1;\n\t\tSystem.out.println(ans);\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tString line1 = scanner.nextLine();\n\t\tscanner.close();\n\t\tString[] linestr =line1.split(\" \",0);\n\t\tlong cards = Long.parseLong(linestr[3]);\n\t\tlong ans = 0;\n\t\tlong[] cardsArr = new long[3];\n\t\tlong[] ansArr = new long[3];\n\t\t\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcardsArr[i] += Long.parseLong(linestr[i]);\n\t\t}\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tif (cards - cardsArr[i] >= 0) {\n\t\t\t\tcards = cards - cardsArr[i];\n\t\t\t\tansArr[i] = cardsArr[i];\n\t\t\t} else {\n\t\t\t\tansArr[i] = cards;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1;\n\t\tSystem.out.println(ans);\n\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner =new Scanner(System.in);
String line1 = scanner.nextLine();
scanner.close();
String[] linestr =line1.split(" ",0);
long cards = Long.parseLong(linestr[3]);
long ans = 0;
long[] cardsArr = new long[3];
long[] ansArr = new long[3];
for (int i = 0; i < 3; i++) {
cardsArr[i] += Long.parseLong(linestr[i]);
}
for (int i = 0; i < 3; i++) {
if (cards - cardsArr[i] >= 0) {
cards = cards - cardsArr[i];
ansArr[i] = cardsArr[i];
} else {
ansArr[i] = cards;
break;
}
}
ans = ansArr[0] * 1 + ansArr[1] * 0 + ansArr[2] * -1;
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,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
14,
2,
13,
13,
0,
13,
17,
0,
13,
13,
14,
2,
13,
17,
0,
13,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
118,
8
],
[
118,
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
],
[
22,
23
],
[
23,
24
],
[
20,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
39,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
47,
49
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
11,
58
],
[
58,
59
],
[
58,
60
],
[
11,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
69,
71
],
[
11,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
11,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
95,
96
],
[
95,
97
],
[
11,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
11,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
11,
109
],
[
109,
110
],
[
110,
111
],
[
11,
112
],
[
112,
113
],
[
113,
114
],
[
9,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] |
[
"import java.util.*;\nimport java.io.*;\npublic class Main\n{\n public static void main(String args[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int a=Integer.parseInt(str[0]);\n int b=Integer.parseInt(str[1]);\n int c=Integer.parseInt(str[2]);\n int k=Integer.parseInt(str[3]);\n int ans=0;\n if(a>=k)\n {\n ans=k;\n k=0;\n }\n if(a<k)\n {\n ans+=a;\n k-=a;\n }\n if(k>0)\n {\n if(b>k)\n k=0;\n else\n k-=b;\n }\n if(k>0)\n ans-=k;\n pw.println(ans);\n pw.flush();\n pw.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main\n{\n public static void main(String args[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int a=Integer.parseInt(str[0]);\n int b=Integer.parseInt(str[1]);\n int c=Integer.parseInt(str[2]);\n int k=Integer.parseInt(str[3]);\n int ans=0;\n if(a>=k)\n {\n ans=k;\n k=0;\n }\n if(a<k)\n {\n ans+=a;\n k-=a;\n }\n if(k>0)\n {\n if(b>k)\n k=0;\n else\n k-=b;\n }\n if(k>0)\n ans-=k;\n pw.println(ans);\n pw.flush();\n pw.close();\n }\n}",
"Main",
"public static void main(String args[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int a=Integer.parseInt(str[0]);\n int b=Integer.parseInt(str[1]);\n int c=Integer.parseInt(str[2]);\n int k=Integer.parseInt(str[3]);\n int ans=0;\n if(a>=k)\n {\n ans=k;\n k=0;\n }\n if(a<k)\n {\n ans+=a;\n k-=a;\n }\n if(k>0)\n {\n if(b>k)\n k=0;\n else\n k-=b;\n }\n if(k>0)\n ans-=k;\n pw.println(ans);\n pw.flush();\n pw.close();\n }",
"main",
"{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int a=Integer.parseInt(str[0]);\n int b=Integer.parseInt(str[1]);\n int c=Integer.parseInt(str[2]);\n int k=Integer.parseInt(str[3]);\n int ans=0;\n if(a>=k)\n {\n ans=k;\n k=0;\n }\n if(a<k)\n {\n ans+=a;\n k-=a;\n }\n if(k>0)\n {\n if(b>k)\n k=0;\n else\n k-=b;\n }\n if(k>0)\n ans-=k;\n pw.println(ans);\n pw.flush();\n pw.close();\n }",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter pw=new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"String str[]=br.readLine().split(\" \");",
"str",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int a=Integer.parseInt(str[0]);",
"a",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"int b=Integer.parseInt(str[1]);",
"b",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"int c=Integer.parseInt(str[2]);",
"c",
"Integer.parseInt(str[2])",
"Integer.parseInt",
"Integer",
"str[2]",
"str",
"2",
"int k=Integer.parseInt(str[3]);",
"k",
"Integer.parseInt(str[3])",
"Integer.parseInt",
"Integer",
"str[3]",
"str",
"3",
"int ans=0;",
"ans",
"0",
"if(a>=k)\n {\n ans=k;\n k=0;\n }",
"a>=k",
"a",
"k",
"{\n ans=k;\n k=0;\n }",
"ans=k",
"ans",
"k",
"k=0",
"k",
"0",
"if(a<k)\n {\n ans+=a;\n k-=a;\n }",
"a<k",
"a",
"k",
"{\n ans+=a;\n k-=a;\n }",
"ans+=a",
"ans",
"a",
"k-=a",
"k",
"a",
"if(k>0)\n {\n if(b>k)\n k=0;\n else\n k-=b;\n }",
"k>0",
"k",
"0",
"{\n if(b>k)\n k=0;\n else\n k-=b;\n }",
"if(b>k)\n k=0;\n else\n k-=b;",
"b>k",
"b",
"k",
"k=0",
"k",
"0",
"k-=b",
"k",
"b",
"if(k>0)\n ans-=k;",
"k>0",
"k",
"0",
"ans-=k",
"ans",
"k",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"pw.flush()",
"pw.flush",
"pw",
"pw.close()",
"pw.close",
"pw",
"String args[]",
"args",
"public class Main\n{\n public static void main(String args[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int a=Integer.parseInt(str[0]);\n int b=Integer.parseInt(str[1]);\n int c=Integer.parseInt(str[2]);\n int k=Integer.parseInt(str[3]);\n int ans=0;\n if(a>=k)\n {\n ans=k;\n k=0;\n }\n if(a<k)\n {\n ans+=a;\n k-=a;\n }\n if(k>0)\n {\n if(b>k)\n k=0;\n else\n k-=b;\n }\n if(k>0)\n ans-=k;\n pw.println(ans);\n pw.flush();\n pw.close();\n }\n}",
"public class Main\n{\n public static void main(String args[])throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw=new PrintWriter(System.out);\n String str[]=br.readLine().split(\" \");\n int a=Integer.parseInt(str[0]);\n int b=Integer.parseInt(str[1]);\n int c=Integer.parseInt(str[2]);\n int k=Integer.parseInt(str[3]);\n int ans=0;\n if(a>=k)\n {\n ans=k;\n k=0;\n }\n if(a<k)\n {\n ans+=a;\n k-=a;\n }\n if(k>0)\n {\n if(b>k)\n k=0;\n else\n k-=b;\n }\n if(k>0)\n ans-=k;\n pw.println(ans);\n pw.flush();\n pw.close();\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 pw=new PrintWriter(System.out);
String str[]=br.readLine().split(" ");
int a=Integer.parseInt(str[0]);
int b=Integer.parseInt(str[1]);
int c=Integer.parseInt(str[2]);
int k=Integer.parseInt(str[3]);
int ans=0;
if(a>=k)
{
ans=k;
k=0;
}
if(a<k)
{
ans+=a;
k-=a;
}
if(k>0)
{
if(b>k)
k=0;
else
k-=b;
}
if(k>0)
ans-=k;
pw.println(ans);
pw.flush();
pw.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
40,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
0,
13,
13,
40,
13,
14,
2,
13,
17,
30,
0,
13,
13,
40,
13,
30,
0,
13,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
93,
5
],
[
93,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
8,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
6,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
] |
[
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n\n int score_A = 1;\n int score_B = 0;\n int score_C = -1;\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n int score=0;\n for(int loop=0; loop<K; loop++){\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }\n System.out.println( score );\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n\n int score_A = 1;\n int score_B = 0;\n int score_C = -1;\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n int score=0;\n for(int loop=0; loop<K; loop++){\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }\n System.out.println( score );\n }\n}",
"Main",
"public static void main(String[] args){\n\n int score_A = 1;\n int score_B = 0;\n int score_C = -1;\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n int score=0;\n for(int loop=0; loop<K; loop++){\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }\n System.out.println( score );\n }",
"main",
"{\n\n int score_A = 1;\n int score_B = 0;\n int score_C = -1;\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n int score=0;\n for(int loop=0; loop<K; loop++){\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }\n System.out.println( score );\n }",
"int score_A = 1;",
"score_A",
"1",
"int score_B = 0;",
"score_B",
"0",
"int score_C = -1;",
"score_C",
"-1",
"1",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int A = scanner.nextInt();",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int B = scanner.nextInt();",
"B",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int C = scanner.nextInt();",
"C",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int K = scanner.nextInt();",
"K",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int score=0;",
"score",
"0",
"for(int loop=0; loop<K; loop++){\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }",
"int loop=0;",
"int loop=0;",
"loop",
"0",
"loop<K",
"loop",
"K",
"loop++",
"loop++",
"loop",
"{\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }",
"{\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }",
"if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }",
"A>0",
"A",
"0",
"{\n score += score_A;\n A--;\n\n }",
"score += score_A",
"score",
"score_A",
"A--",
"A",
"if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }",
"B>0",
"B",
"0",
"{\n score += score_B;\n B--;\n\n }",
"score += score_B",
"score",
"score_B",
"B--",
"B",
"{\n score += score_C;\n C--;\n }",
"score += score_C",
"score",
"score_C",
"C--",
"C",
"System.out.println( score )",
"System.out.println",
"System.out",
"System",
"System.out",
"score",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n\n int score_A = 1;\n int score_B = 0;\n int score_C = -1;\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n int score=0;\n for(int loop=0; loop<K; loop++){\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }\n System.out.println( score );\n }\n}",
"public class Main{\n public static void main(String[] args){\n\n int score_A = 1;\n int score_B = 0;\n int score_C = -1;\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n int score=0;\n for(int loop=0; loop<K; loop++){\n if(A>0){\n score += score_A;\n A--;\n\n }else if(B>0){\n score += score_B;\n B--;\n\n }else{\n score += score_C;\n C--;\n }\n }\n System.out.println( score );\n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args){
int score_A = 1;
int score_B = 0;
int score_C = -1;
Scanner scanner = new Scanner(System.in);
int A = scanner.nextInt();
int B = scanner.nextInt();
int C = scanner.nextInt();
int K = scanner.nextInt();
int score=0;
for(int loop=0; loop<K; loop++){
if(A>0){
score += score_A;
A--;
}else if(B>0){
score += score_B;
B--;
}else{
score += score_C;
C--;
}
}
System.out.println( score );
}
}
|
[
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,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
13,
13,
14,
2,
17,
2,
2,
13,
13,
13,
30,
0,
13,
2,
4,
18,
13,
13,
2,
2,
13,
13,
13,
40,
17,
4,
18,
18,
13,
13,
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,
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,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
227,
11
],
[
227,
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
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
14,
50
],
[
50,
51
],
[
14,
52
],
[
52,
53
],
[
14,
54
],
[
54,
55
],
[
14,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
14,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
67,
67
],
[
67,
68
],
[
67,
69
],
[
67,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
80,
80
],
[
80,
81
],
[
80,
82
],
[
80,
83
],
[
74,
84
],
[
84,
85
],
[
14,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
12,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
94,
101
],
[
101,
102
],
[
101,
103
],
[
94,
105
],
[
105,
106
],
[
105,
107
],
[
94,
108
],
[
108,
109
],
[
108,
110
],
[
94,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
119,
120
],
[
114,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
125,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
135,
138
],
[
121,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
144,
145
],
[
113,
146
],
[
146,
147
],
[
94,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
151,
159
],
[
159,
160
],
[
160,
161
],
[
94,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
170,
171
],
[
170,
172
],
[
162,
173
],
[
173,
174
],
[
94,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
179,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
185,
187
],
[
178,
188
],
[
188,
189
],
[
177,
190
],
[
190,
191
],
[
191,
192
],
[
94,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
196,
200
],
[
200,
201
],
[
195,
202
],
[
202,
203
],
[
202,
204
],
[
195,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
195,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
214,
217
],
[
213,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
195,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
0,
226
],
[
226,
227
],
[
226,
228
]
] |
[
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.NoSuchElementException;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\n\t\tint A = Integer.parseInt(sc.next());\n\t\tint B = Integer.parseInt(sc.next());\n\t\tint C = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint sum,num;\n\t\tint max;\n\n\t\tmax = Math.min(A, K);\n\t\tif(0 < K - A - B) {\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}\n\n\t\tSystem.out.print(max);\n\t}\n\n}\n\nclass FastScanner {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] buffer = new byte[1024];\n\tprivate int ptr = 0;\n\tprivate int buflen = 0;\n\tprivate boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\tprivate static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\tpublic boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\tpublic String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\n\t\tint A = Integer.parseInt(sc.next());\n\t\tint B = Integer.parseInt(sc.next());\n\t\tint C = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint sum,num;\n\t\tint max;\n\n\t\tmax = Math.min(A, K);\n\t\tif(0 < K - A - B) {\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}\n\n\t\tSystem.out.print(max);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\n\t\tint A = Integer.parseInt(sc.next());\n\t\tint B = Integer.parseInt(sc.next());\n\t\tint C = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint sum,num;\n\t\tint max;\n\n\t\tmax = Math.min(A, K);\n\t\tif(0 < K - A - B) {\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}\n\n\t\tSystem.out.print(max);\n\t}",
"main",
"{\n\t\tFastScanner sc = new FastScanner();\n\n\t\tint A = Integer.parseInt(sc.next());\n\t\tint B = Integer.parseInt(sc.next());\n\t\tint C = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint sum,num;\n\t\tint max;\n\n\t\tmax = Math.min(A, K);\n\t\tif(0 < K - A - B) {\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}\n\n\t\tSystem.out.print(max);\n\t}",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"int A = Integer.parseInt(sc.next());",
"A",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int B = Integer.parseInt(sc.next());",
"B",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int C = Integer.parseInt(sc.next());",
"C",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int K = Integer.parseInt(sc.next());",
"K",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int sum",
"sum",
"num;",
"num",
"int max;",
"max",
"max = Math.min(A, K)",
"max",
"Math.min(A, K)",
"Math.min",
"Math",
"A",
"K",
"if(0 < K - A - B) {\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}",
"0 < K - A - B",
"0",
"K - A - B",
"K - A - B",
"K",
"A",
"B",
"{\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}",
"max += Math.min(C, K - A - B) * -1",
"max",
"Math.min(C, K - A - B) * -1",
"Math.min(C, K - A - B)",
"Math.min",
"Math",
"C",
"K - A - B",
"K - A - B",
"K",
"A",
"B",
"-1",
"1",
"System.out.print(max)",
"System.out.print",
"System.out",
"System",
"System.out",
"max",
"String[] args",
"args",
"class FastScanner {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] buffer = new byte[1024];\n\tprivate int ptr = 0;\n\tprivate int buflen = 0;\n\tprivate boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\tprivate static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\tpublic boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\tpublic String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n}",
"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\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"hasNextByte",
"{\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"ptr < buflen",
"ptr",
"buflen",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"ptr = 0",
"ptr",
"0",
"try {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t}",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"buflen <= 0",
"buflen",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"readByte",
"{ if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"if (hasNextByte()) return buffer[ptr++]; else return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}",
"isPrintableChar",
"{ return 33 <= c && c <= 126;}",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"hasNext",
"{ while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"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",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}",
"next",
"{\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn 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\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\n\t\tint A = Integer.parseInt(sc.next());\n\t\tint B = Integer.parseInt(sc.next());\n\t\tint C = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint sum,num;\n\t\tint max;\n\n\t\tmax = Math.min(A, K);\n\t\tif(0 < K - A - B) {\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}\n\n\t\tSystem.out.print(max);\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner();\n\n\t\tint A = Integer.parseInt(sc.next());\n\t\tint B = Integer.parseInt(sc.next());\n\t\tint C = Integer.parseInt(sc.next());\n\t\tint K = Integer.parseInt(sc.next());\n\t\tint sum,num;\n\t\tint max;\n\n\t\tmax = Math.min(A, K);\n\t\tif(0 < K - A - B) {\n\t\t\tmax += Math.min(C, K - A - B) * -1;\n\t\t}\n\n\t\tSystem.out.print(max);\n\t}\n\n}",
"Main"
] |
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
int A = Integer.parseInt(sc.next());
int B = Integer.parseInt(sc.next());
int C = Integer.parseInt(sc.next());
int K = Integer.parseInt(sc.next());
int sum,num;
int max;
max = Math.min(A, K);
if(0 < K - A - B) {
max += Math.min(C, K - A - B) * -1;
}
System.out.print(max);
}
}
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;}
public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; 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();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
87,
5
],
[
87,
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
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
36,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
47,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
58,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String column[] = line.split(\" \");\n int card1 = Integer.parseInt(column[0]);\n int card0 = Integer.parseInt(column[1]);\n int draw = Integer.parseInt(column[3]);\n \n if(card1 >= draw){\n System.out.println(draw);\n }else if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\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 String line = sc.nextLine();\n String column[] = line.split(\" \");\n int card1 = Integer.parseInt(column[0]);\n int card0 = Integer.parseInt(column[1]);\n int draw = Integer.parseInt(column[3]);\n \n if(card1 >= draw){\n System.out.println(draw);\n }else if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String column[] = line.split(\" \");\n int card1 = Integer.parseInt(column[0]);\n int card0 = Integer.parseInt(column[1]);\n int draw = Integer.parseInt(column[3]);\n \n if(card1 >= draw){\n System.out.println(draw);\n }else if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String column[] = line.split(\" \");\n int card1 = Integer.parseInt(column[0]);\n int card0 = Integer.parseInt(column[1]);\n int draw = Integer.parseInt(column[3]);\n \n if(card1 >= draw){\n System.out.println(draw);\n }else if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String line = sc.nextLine();",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String column[] = line.split(\" \");",
"column",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"int card1 = Integer.parseInt(column[0]);",
"card1",
"Integer.parseInt(column[0])",
"Integer.parseInt",
"Integer",
"column[0]",
"column",
"0",
"int card0 = Integer.parseInt(column[1]);",
"card0",
"Integer.parseInt(column[1])",
"Integer.parseInt",
"Integer",
"column[1]",
"column",
"1",
"int draw = Integer.parseInt(column[3]);",
"draw",
"Integer.parseInt(column[3])",
"Integer.parseInt",
"Integer",
"column[3]",
"column",
"3",
"if(card1 >= draw){\n System.out.println(draw);\n }else if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\n }",
"card1 >= draw",
"card1",
"draw",
"{\n System.out.println(draw);\n }",
"System.out.println(draw)",
"System.out.println",
"System.out",
"System",
"System.out",
"draw",
"if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\n }",
"card1 + card0 >= draw",
"card1 + card0",
"card1",
"card0",
"draw",
"{\n System.out.println(card1);\n }",
"System.out.println(card1)",
"System.out.println",
"System.out",
"System",
"System.out",
"card1",
"{\n System.out.println(card1 - (draw - card1 -card0));\n }",
"System.out.println(card1 - (draw - card1 -card0))",
"System.out.println",
"System.out",
"System",
"System.out",
"card1 - (draw - card1 -card0)",
"card1",
"(draw - card1 -card0)",
"draw - card1 -card0",
"draw",
"card1",
"card0",
"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 String column[] = line.split(\" \");\n int card1 = Integer.parseInt(column[0]);\n int card0 = Integer.parseInt(column[1]);\n int draw = Integer.parseInt(column[3]);\n \n if(card1 >= draw){\n System.out.println(draw);\n }else if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\n }\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 String column[] = line.split(\" \");\n int card1 = Integer.parseInt(column[0]);\n int card0 = Integer.parseInt(column[1]);\n int draw = Integer.parseInt(column[3]);\n \n if(card1 >= draw){\n System.out.println(draw);\n }else if(card1 + card0 >= draw){\n System.out.println(card1);\n }else{\n System.out.println(card1 - (draw - card1 -card0));\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String line = sc.nextLine();
String column[] = line.split(" ");
int card1 = Integer.parseInt(column[0]);
int card0 = Integer.parseInt(column[1]);
int draw = Integer.parseInt(column[3]);
if(card1 >= draw){
System.out.println(draw);
}else if(card1 + card0 >= draw){
System.out.println(card1);
}else{
System.out.println(card1 - (draw - card1 -card0));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
13,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
0,
13,
17,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
113,
5
],
[
113,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
38,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
8,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
8,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
80,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
6,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
] |
[
"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 A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n\n int maxSum = 0;\n\n int availK = K;\n if(availK - A >= 0){\n availK -= A;\n maxSum += A;\n }\n else if(availK > 0){\n maxSum += availK;\n availK = 0;\n }\n if(availK - B >= 0){\n availK -= B;\n }\n else if(availK > 0){\n availK = 0;\n }\n if(availK - C >= 0){\n availK -= C;\n maxSum -= C;\n }\n else if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }\n System.out.println(maxSum);\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 A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n\n int maxSum = 0;\n\n int availK = K;\n if(availK - A >= 0){\n availK -= A;\n maxSum += A;\n }\n else if(availK > 0){\n maxSum += availK;\n availK = 0;\n }\n if(availK - B >= 0){\n availK -= B;\n }\n else if(availK > 0){\n availK = 0;\n }\n if(availK - C >= 0){\n availK -= C;\n maxSum -= C;\n }\n else if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }\n System.out.println(maxSum);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n\n int maxSum = 0;\n\n int availK = K;\n if(availK - A >= 0){\n availK -= A;\n maxSum += A;\n }\n else if(availK > 0){\n maxSum += availK;\n availK = 0;\n }\n if(availK - B >= 0){\n availK -= B;\n }\n else if(availK > 0){\n availK = 0;\n }\n if(availK - C >= 0){\n availK -= C;\n maxSum -= C;\n }\n else if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }\n System.out.println(maxSum);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n\n int maxSum = 0;\n\n int availK = K;\n if(availK - A >= 0){\n availK -= A;\n maxSum += A;\n }\n else if(availK > 0){\n maxSum += availK;\n availK = 0;\n }\n if(availK - B >= 0){\n availK -= B;\n }\n else if(availK > 0){\n availK = 0;\n }\n if(availK - C >= 0){\n availK -= C;\n maxSum -= C;\n }\n else if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }\n System.out.println(maxSum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int C = sc.nextInt();",
"C",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int maxSum = 0;",
"maxSum",
"0",
"int availK = K;",
"availK",
"K",
"if(availK - A >= 0){\n availK -= A;\n maxSum += A;\n }\n else if(availK > 0){\n maxSum += availK;\n availK = 0;\n }",
"availK - A >= 0",
"availK - A",
"availK",
"A",
"0",
"{\n availK -= A;\n maxSum += A;\n }",
"availK -= A",
"availK",
"A",
"maxSum += A",
"maxSum",
"A",
"if(availK > 0){\n maxSum += availK;\n availK = 0;\n }",
"availK > 0",
"availK",
"0",
"{\n maxSum += availK;\n availK = 0;\n }",
"maxSum += availK",
"maxSum",
"availK",
"availK = 0",
"availK",
"0",
"if(availK - B >= 0){\n availK -= B;\n }\n else if(availK > 0){\n availK = 0;\n }",
"availK - B >= 0",
"availK - B",
"availK",
"B",
"0",
"{\n availK -= B;\n }",
"availK -= B",
"availK",
"B",
"if(availK > 0){\n availK = 0;\n }",
"availK > 0",
"availK",
"0",
"{\n availK = 0;\n }",
"availK = 0",
"availK",
"0",
"if(availK - C >= 0){\n availK -= C;\n maxSum -= C;\n }\n else if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }",
"availK - C >= 0",
"availK - C",
"availK",
"C",
"0",
"{\n availK -= C;\n maxSum -= C;\n }",
"availK -= C",
"availK",
"C",
"maxSum -= C",
"maxSum",
"C",
"if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }",
"availK > 0",
"availK",
"0",
"{\n maxSum -= availK;\n availK = 0;\n }",
"maxSum -= availK",
"maxSum",
"availK",
"availK = 0",
"availK",
"0",
"System.out.println(maxSum)",
"System.out.println",
"System.out",
"System",
"System.out",
"maxSum",
"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 int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n\n int maxSum = 0;\n\n int availK = K;\n if(availK - A >= 0){\n availK -= A;\n maxSum += A;\n }\n else if(availK > 0){\n maxSum += availK;\n availK = 0;\n }\n if(availK - B >= 0){\n availK -= B;\n }\n else if(availK > 0){\n availK = 0;\n }\n if(availK - C >= 0){\n availK -= C;\n maxSum -= C;\n }\n else if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }\n System.out.println(maxSum);\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 int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n\n int maxSum = 0;\n\n int availK = K;\n if(availK - A >= 0){\n availK -= A;\n maxSum += A;\n }\n else if(availK > 0){\n maxSum += availK;\n availK = 0;\n }\n if(availK - B >= 0){\n availK -= B;\n }\n else if(availK > 0){\n availK = 0;\n }\n if(availK - C >= 0){\n availK -= C;\n maxSum -= C;\n }\n else if(availK > 0){\n maxSum -= availK;\n availK = 0;\n }\n System.out.println(maxSum);\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();
int B = sc.nextInt();
int C = sc.nextInt();
int K = sc.nextInt();
int maxSum = 0;
int availK = K;
if(availK - A >= 0){
availK -= A;
maxSum += A;
}
else if(availK > 0){
maxSum += availK;
availK = 0;
}
if(availK - B >= 0){
availK -= B;
}
else if(availK > 0){
availK = 0;
}
if(availK - C >= 0){
availK -= C;
maxSum -= C;
}
else if(availK > 0){
maxSum -= availK;
availK = 0;
}
System.out.println(maxSum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
29,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
14,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
40,
17,
30,
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
],
[
106,
5
],
[
106,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
35,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
48,
58
],
[
8,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
59,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
69,
76
],
[
8,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
77,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n final long A = s.nextLong();\n final long B = s.nextLong();\n final long C = s.nextLong();\n long K = s.nextLong();\n\n long calcVal = 0 ;\n if (K - A > 0) {\n calcVal = A;\n K -= A;\n\n } else {\n calcVal = K;\n System.out.println(calcVal);\n return;\n }\n\n if ( K - B > 0) {\n K -= B;\n } else {\n System.out.println(calcVal);\n return;\n }\n\n if (K - C > 1) {\n calcVal += C * -1;\n } else {\n calcVal += K * -1;\n }\n System.out.println(calcVal);\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 final long A = s.nextLong();\n final long B = s.nextLong();\n final long C = s.nextLong();\n long K = s.nextLong();\n\n long calcVal = 0 ;\n if (K - A > 0) {\n calcVal = A;\n K -= A;\n\n } else {\n calcVal = K;\n System.out.println(calcVal);\n return;\n }\n\n if ( K - B > 0) {\n K -= B;\n } else {\n System.out.println(calcVal);\n return;\n }\n\n if (K - C > 1) {\n calcVal += C * -1;\n } else {\n calcVal += K * -1;\n }\n System.out.println(calcVal);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n final long A = s.nextLong();\n final long B = s.nextLong();\n final long C = s.nextLong();\n long K = s.nextLong();\n\n long calcVal = 0 ;\n if (K - A > 0) {\n calcVal = A;\n K -= A;\n\n } else {\n calcVal = K;\n System.out.println(calcVal);\n return;\n }\n\n if ( K - B > 0) {\n K -= B;\n } else {\n System.out.println(calcVal);\n return;\n }\n\n if (K - C > 1) {\n calcVal += C * -1;\n } else {\n calcVal += K * -1;\n }\n System.out.println(calcVal);\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n final long A = s.nextLong();\n final long B = s.nextLong();\n final long C = s.nextLong();\n long K = s.nextLong();\n\n long calcVal = 0 ;\n if (K - A > 0) {\n calcVal = A;\n K -= A;\n\n } else {\n calcVal = K;\n System.out.println(calcVal);\n return;\n }\n\n if ( K - B > 0) {\n K -= B;\n } else {\n System.out.println(calcVal);\n return;\n }\n\n if (K - C > 1) {\n calcVal += C * -1;\n } else {\n calcVal += K * -1;\n }\n System.out.println(calcVal);\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"final long A = s.nextLong();",
"A",
"s.nextLong()",
"s.nextLong",
"s",
"final long B = s.nextLong();",
"B",
"s.nextLong()",
"s.nextLong",
"s",
"final long C = s.nextLong();",
"C",
"s.nextLong()",
"s.nextLong",
"s",
"long K = s.nextLong();",
"K",
"s.nextLong()",
"s.nextLong",
"s",
"long calcVal = 0 ;",
"calcVal",
"0",
"if (K - A > 0) {\n calcVal = A;\n K -= A;\n\n } else {\n calcVal = K;\n System.out.println(calcVal);\n return;\n }",
"K - A > 0",
"K - A",
"K",
"A",
"0",
"{\n calcVal = A;\n K -= A;\n\n }",
"calcVal = A",
"calcVal",
"A",
"K -= A",
"K",
"A",
"{\n calcVal = K;\n System.out.println(calcVal);\n return;\n }",
"calcVal = K",
"calcVal",
"K",
"System.out.println(calcVal)",
"System.out.println",
"System.out",
"System",
"System.out",
"calcVal",
"return;",
"if ( K - B > 0) {\n K -= B;\n } else {\n System.out.println(calcVal);\n return;\n }",
"K - B > 0",
"K - B",
"K",
"B",
"0",
"{\n K -= B;\n }",
"K -= B",
"K",
"B",
"{\n System.out.println(calcVal);\n return;\n }",
"System.out.println(calcVal)",
"System.out.println",
"System.out",
"System",
"System.out",
"calcVal",
"return;",
"if (K - C > 1) {\n calcVal += C * -1;\n } else {\n calcVal += K * -1;\n }",
"K - C > 1",
"K - C",
"K",
"C",
"1",
"{\n calcVal += C * -1;\n }",
"calcVal += C * -1",
"calcVal",
"C * -1",
"C",
"-1",
"1",
"{\n calcVal += K * -1;\n }",
"calcVal += K * -1",
"calcVal",
"K * -1",
"K",
"-1",
"1",
"System.out.println(calcVal)",
"System.out.println",
"System.out",
"System",
"System.out",
"calcVal",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n final long A = s.nextLong();\n final long B = s.nextLong();\n final long C = s.nextLong();\n long K = s.nextLong();\n\n long calcVal = 0 ;\n if (K - A > 0) {\n calcVal = A;\n K -= A;\n\n } else {\n calcVal = K;\n System.out.println(calcVal);\n return;\n }\n\n if ( K - B > 0) {\n K -= B;\n } else {\n System.out.println(calcVal);\n return;\n }\n\n if (K - C > 1) {\n calcVal += C * -1;\n } else {\n calcVal += K * -1;\n }\n System.out.println(calcVal);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n final long A = s.nextLong();\n final long B = s.nextLong();\n final long C = s.nextLong();\n long K = s.nextLong();\n\n long calcVal = 0 ;\n if (K - A > 0) {\n calcVal = A;\n K -= A;\n\n } else {\n calcVal = K;\n System.out.println(calcVal);\n return;\n }\n\n if ( K - B > 0) {\n K -= B;\n } else {\n System.out.println(calcVal);\n return;\n }\n\n if (K - C > 1) {\n calcVal += C * -1;\n } else {\n calcVal += K * -1;\n }\n System.out.println(calcVal);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
final long A = s.nextLong();
final long B = s.nextLong();
final long C = s.nextLong();
long K = s.nextLong();
long calcVal = 0 ;
if (K - A > 0) {
calcVal = A;
K -= A;
} else {
calcVal = K;
System.out.println(calcVal);
return;
}
if ( K - B > 0) {
K -= B;
} else {
System.out.println(calcVal);
return;
}
if (K - C > 1) {
calcVal += C * -1;
} else {
calcVal += K * -1;
}
System.out.println(calcVal);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
99,
5
],
[
99,
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
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
60,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
87,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
6,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] |
[
"import java.util.Scanner;\n\n\n\npublic class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = Integer.parseInt(sc.next());",
"a",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int b = Integer.parseInt(sc.next());",
"b",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int c = Integer.parseInt(sc.next());",
"c",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int k = Integer.parseInt(sc.next());",
"k",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int sum = 0;",
"sum",
"0",
"for(int i = 0; i < k; i++) {\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < k",
"i",
"k",
"i++",
"i++",
"i",
"{\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}",
"if(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}",
"a > 0",
"a",
"0",
"{\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}",
"sum += 1",
"sum",
"1",
"a -= 1",
"a",
"1",
"if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}",
"b > 0",
"b",
"0",
"{\n\t\t\t\tb -= 1;\n\t\t\t}",
"b -= 1",
"b",
"1",
"if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}",
"c > 0",
"c",
"0",
"{\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}",
"sum -= 1",
"sum",
"1",
"c -= 1",
"c",
"1",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n}",
"public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = Integer.parseInt(sc.next());\n\t\tint b = Integer.parseInt(sc.next());\n\t\tint c = Integer.parseInt(sc.next());\n\t\tint k = Integer.parseInt(sc.next());\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(a > 0) {\n\t\t\t\tsum += 1;\n\t\t\t\ta -= 1;\n\t\t\t}else if(b > 0) {\n\t\t\t\tb -= 1;\n\t\t\t}else if(c > 0){\n\t\t\t\tsum -= 1;\n\t\t\t\tc -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int c = Integer.parseInt(sc.next());
int k = Integer.parseInt(sc.next());
int sum = 0;
for(int i = 0; i < k; i++) {
if(a > 0) {
sum += 1;
a -= 1;
}else if(b > 0) {
b -= 1;
}else if(c > 0){
sum -= 1;
c -= 1;
}
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
0,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
0,
13,
13,
4,
18,
13,
13,
4,
18,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
207,
17
],
[
207,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
28,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
28,
45
],
[
45,
46
],
[
45,
47
],
[
20,
48
],
[
48,
49
],
[
18,
50
],
[
50,
51
],
[
18,
52
],
[
52,
53
],
[
207,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
60,
62
],
[
56,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
56,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
56,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
56,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
56,
83
],
[
83,
84
],
[
83,
85
],
[
56,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
86,
93
],
[
93,
94
],
[
93,
95
],
[
56,
96
],
[
96,
97
],
[
96,
98
],
[
56,
99
],
[
99,
100
],
[
99,
101
],
[
56,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
56,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
56,
113
],
[
113,
114
],
[
114,
115
],
[
54,
116
],
[
116,
117
],
[
207,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
118,
122
],
[
122,
123
],
[
118,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
118,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
133,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
143,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
132,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
118,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
162,
165
],
[
165,
166
],
[
118,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
171,
174
],
[
174,
175
],
[
118,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
180,
183
],
[
183,
184
],
[
118,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
191,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
187,
204
],
[
204,
205
],
[
0,
206
],
[
206,
207
],
[
206,
208
]
] |
[
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter pr = new PrintWriter(System.out);\n\t\tlong a = sc.nextLong(), b = sc.nextLong(), c = sc.nextLong(), k = sc.nextLong();\n\t\tlong sum = 0;\n\t\t\n\t\tif(k > a)\n\t\t\tsum += a;\n\t\telse\n\t\t\tsum += k;\n\t\t\n\t\tk -= a;\n\t\tk -= b;\n\t\tif (k > 0)\n\t\t\tsum -= k;\n\n\t\tpr.println(sum);\n\t\tpr.close();\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\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",
"public class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter pr = new PrintWriter(System.out);\n\t\tlong a = sc.nextLong(), b = sc.nextLong(), c = sc.nextLong(), k = sc.nextLong();\n\t\tlong sum = 0;\n\t\t\n\t\tif(k > a)\n\t\t\tsum += a;\n\t\telse\n\t\t\tsum += k;\n\t\t\n\t\tk -= a;\n\t\tk -= b;\n\t\tif (k > 0)\n\t\t\tsum -= k;\n\n\t\tpr.println(sum);\n\t\tpr.close();\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}",
"Main",
"static long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}",
"expo",
"{\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}",
"long t = 1L;",
"t",
"1L",
"while (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}",
"exp > 0",
"exp",
"0",
"{\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}",
"if (exp % 2 != 0)\n\t\t\t\tt = (t * base);",
"exp % 2 != 0",
"exp % 2",
"exp",
"2",
"0",
"t = (t * base)",
"t",
"(t * base)",
"t",
"base",
"base = (base * base)",
"base",
"(base * base)",
"base",
"base",
"exp /= 2",
"exp",
"2",
"return t;",
"t",
"long base",
"base",
"long exp",
"exp",
"public static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter pr = new PrintWriter(System.out);\n\t\tlong a = sc.nextLong(), b = sc.nextLong(), c = sc.nextLong(), k = sc.nextLong();\n\t\tlong sum = 0;\n\t\t\n\t\tif(k > a)\n\t\t\tsum += a;\n\t\telse\n\t\t\tsum += k;\n\t\t\n\t\tk -= a;\n\t\tk -= b;\n\t\tif (k > 0)\n\t\t\tsum -= k;\n\n\t\tpr.println(sum);\n\t\tpr.close();\n\t}",
"main",
"{\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter pr = new PrintWriter(System.out);\n\t\tlong a = sc.nextLong(), b = sc.nextLong(), c = sc.nextLong(), k = sc.nextLong();\n\t\tlong sum = 0;\n\t\t\n\t\tif(k > a)\n\t\t\tsum += a;\n\t\telse\n\t\t\tsum += k;\n\t\t\n\t\tk -= a;\n\t\tk -= b;\n\t\tif (k > 0)\n\t\t\tsum -= k;\n\n\t\tpr.println(sum);\n\t\tpr.close();\n\t}",
"MyScanner sc = new MyScanner();",
"sc",
"new MyScanner()",
"PrintWriter pr = new PrintWriter(System.out);",
"pr",
"new PrintWriter(System.out)",
"long a = sc.nextLong()",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"b = sc.nextLong()",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"c = sc.nextLong()",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"k = sc.nextLong();",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long sum = 0;",
"sum",
"0",
"if(k > a)\n\t\t\tsum += a;\n\t\telse\n\t\t\tsum += k;",
"k > a",
"k",
"a",
"sum += a",
"sum",
"a",
"sum += k",
"sum",
"k",
"k -= a",
"k",
"a",
"k -= b",
"k",
"b",
"if (k > 0)\n\t\t\tsum -= k;",
"k > 0",
"k",
"0",
"sum -= k",
"sum",
"k",
"pr.println(sum)",
"pr.println",
"pr",
"sum",
"pr.close()",
"pr.close",
"pr",
"String args[]",
"args",
"public static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}",
"MyScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"MyScanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"try {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\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",
"long nextLong() {\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",
"double nextDouble() {\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",
"String nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"nextLine",
"{\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"String str = \"\";",
"str",
"\"\"",
"try {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\tstr = br.readLine();\n\t\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter pr = new PrintWriter(System.out);\n\t\tlong a = sc.nextLong(), b = sc.nextLong(), c = sc.nextLong(), k = sc.nextLong();\n\t\tlong sum = 0;\n\t\t\n\t\tif(k > a)\n\t\t\tsum += a;\n\t\telse\n\t\t\tsum += k;\n\t\t\n\t\tk -= a;\n\t\tk -= b;\n\t\tif (k > 0)\n\t\t\tsum -= k;\n\n\t\tpr.println(sum);\n\t\tpr.close();\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}",
"public class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter pr = new PrintWriter(System.out);\n\t\tlong a = sc.nextLong(), b = sc.nextLong(), c = sc.nextLong(), k = sc.nextLong();\n\t\tlong sum = 0;\n\t\t\n\t\tif(k > a)\n\t\t\tsum += a;\n\t\telse\n\t\t\tsum += k;\n\t\t\n\t\tk -= a;\n\t\tk -= b;\n\t\tif (k > 0)\n\t\t\tsum -= k;\n\n\t\tpr.println(sum);\n\t\tpr.close();\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
static long expo(long base, long exp) {
long t = 1L;
while (exp > 0) {
if (exp % 2 != 0)
t = (t * base);
base = (base * base);
exp /= 2;
}
return t;
}
public static void main(String args[]) throws Exception {
MyScanner sc = new MyScanner();
PrintWriter pr = new PrintWriter(System.out);
long a = sc.nextLong(), b = sc.nextLong(), c = sc.nextLong(), k = sc.nextLong();
long sum = 0;
if(k > a)
sum += a;
else
sum += k;
k -= a;
k -= b;
if (k > 0)
sum -= k;
pr.println(sum);
pr.close();
}
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,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
13,
17,
30,
40,
13,
40,
13,
0,
13,
17,
14,
2,
13,
17,
30,
40,
13,
40,
13,
0,
13,
17,
14,
2,
13,
17,
30,
40,
13,
40,
13,
0,
13,
40,
17,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
89,
5
],
[
89,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
40,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
52,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
8,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
6,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\twhile (k > 0) {\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\n\t}\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\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\twhile (k > 0) {\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\twhile (k > 0) {\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\twhile (k > 0) {\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"while (k > 0) {\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}",
"k > 0",
"k",
"0",
"{\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}",
"if (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}",
"a != 0",
"a",
"0",
"{\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t}",
"a--",
"a",
"k--",
"k",
"sum += 1",
"sum",
"1",
"if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}",
"b != 0",
"b",
"0",
"{\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t}",
"b--",
"b",
"k--",
"k",
"sum += 0",
"sum",
"0",
"if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}",
"c != 0",
"c",
"0",
"{\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}",
"c--",
"c",
"k--",
"k",
"sum += -1",
"sum",
"-1",
"1",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"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\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\twhile (k > 0) {\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint k = sc.nextInt();\n\n\t\tint sum = 0;\n\n\t\twhile (k > 0) {\n\t\t\tif (a != 0) {\n\t\t\t\ta--;\n\t\t\t\tk--;\n\t\t\t\tsum += 1;\n\t\t\t} else if (b != 0) {\n\t\t\t\tb--;\n\t\t\t\tk--;\n\t\t\t\tsum += 0;\n\t\t\t} else if (c != 0) {\n\t\t\t\tc--;\n\t\t\t\tk--;\n\t\t\t\tsum += -1;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tsc.close();\n\n\t}\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();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int sum = 0;
while (k > 0) {
if (a != 0) {
a--;
k--;
sum += 1;
} else if (b != 0) {
b--;
k--;
sum += 0;
} else if (c != 0) {
c--;
k--;
sum += -1;
}
}
System.out.println(sum);
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
13,
13,
13,
17,
0,
13,
4,
13,
13,
13,
17,
0,
13,
4,
13,
13,
13,
40,
17,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
0,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
23,
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
],
[
7,
12
],
[
12,
13
],
[
12,
14
],
[
7,
15
],
[
15,
16
],
[
15,
17
],
[
7,
18
],
[
18,
19
],
[
18,
20
],
[
7,
21
],
[
21,
22
],
[
21,
23
],
[
7,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
26,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
26,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
26,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
52,
55
],
[
52,
56
],
[
26,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
59,
62
],
[
59,
63
],
[
26,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
66,
69
],
[
66,
70
],
[
70,
71
],
[
26,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
24,
78
],
[
78,
79
],
[
7,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
82,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
99,
100
],
[
99,
101
],
[
89,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
102,
108
],
[
108,
109
],
[
108,
110
],
[
82,
111
],
[
111,
112
],
[
80,
113
],
[
113,
114
],
[
80,
115
],
[
115,
116
],
[
80,
117
],
[
117,
118
]
] |
[
"import java.io.*;\nimport java.util.*;\nclass Main {\n public static int result = 0;\n public static int a = 0;\n public static int b = 0;\n public static int c = 0;\n public static int k = 0;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt(); //1のカード枚数\n b = sc.nextInt(); //0のカード枚数\n c = sc.nextInt(); //-1のカード枚数\n k = sc.nextInt(); //引くカードの枚数\n k = calc(a,k, 1);\n k = calc(b,k, 0);\n k = calc(c,k, -1);\n System.out.println(result);\n }\n public static int calc(int num, int k , int card){\n if(k==0) return k;\n if(num >= k){\n result += k*card;\n k=0;\n }else {\n result += num*card;\n k-=num;\n }\n return k;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static int result = 0;\n public static int a = 0;\n public static int b = 0;\n public static int c = 0;\n public static int k = 0;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt(); //1のカード枚数\n b = sc.nextInt(); //0のカード枚数\n c = sc.nextInt(); //-1のカード枚数\n k = sc.nextInt(); //引くカードの枚数\n k = calc(a,k, 1);\n k = calc(b,k, 0);\n k = calc(c,k, -1);\n System.out.println(result);\n }\n public static int calc(int num, int k , int card){\n if(k==0) return k;\n if(num >= k){\n result += k*card;\n k=0;\n }else {\n result += num*card;\n k-=num;\n }\n return k;\n }\n}",
"Main",
"public static int result = 0;",
"result",
"0",
"public static int a = 0;",
"a",
"0",
"public static int b = 0;",
"b",
"0",
"public static int c = 0;",
"c",
"0",
"public static int k = 0;",
"k",
"0",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt(); //1のカード枚数\n b = sc.nextInt(); //0のカード枚数\n c = sc.nextInt(); //-1のカード枚数\n k = sc.nextInt(); //引くカードの枚数\n k = calc(a,k, 1);\n k = calc(b,k, 0);\n k = calc(c,k, -1);\n System.out.println(result);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt(); //1のカード枚数\n b = sc.nextInt(); //0のカード枚数\n c = sc.nextInt(); //-1のカード枚数\n k = sc.nextInt(); //引くカードの枚数\n k = calc(a,k, 1);\n k = calc(b,k, 0);\n k = calc(c,k, -1);\n System.out.println(result);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c = sc.nextInt()",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt()",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = calc(a,k, 1)",
"k",
"calc(a,k, 1)",
"calc",
"a",
"k",
"1",
"k = calc(b,k, 0)",
"k",
"calc(b,k, 0)",
"calc",
"b",
"k",
"0",
"k = calc(c,k, -1)",
"k",
"calc(c,k, -1)",
"calc",
"c",
"k",
"-1",
"1",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public static int calc(int num, int k , int card){\n if(k==0) return k;\n if(num >= k){\n result += k*card;\n k=0;\n }else {\n result += num*card;\n k-=num;\n }\n return k;\n }",
"calc",
"{\n if(k==0) return k;\n if(num >= k){\n result += k*card;\n k=0;\n }else {\n result += num*card;\n k-=num;\n }\n return k;\n }",
"if(k==0) return k;",
"k==0",
"k",
"0",
"return k;",
"k",
"if(num >= k){\n result += k*card;\n k=0;\n }else {\n result += num*card;\n k-=num;\n }",
"num >= k",
"num",
"k",
"{\n result += k*card;\n k=0;\n }",
"result += k*card",
"result",
"k*card",
"k",
"card",
"k=0",
"k",
"0",
"{\n result += num*card;\n k-=num;\n }",
"result += num*card",
"result",
"num*card",
"num",
"card",
"k-=num",
"k",
"num",
"return k;",
"k",
"int num",
"num",
"int k",
"k",
"int card",
"card"
] |
import java.io.*;
import java.util.*;
class Main {
public static int result = 0;
public static int a = 0;
public static int b = 0;
public static int c = 0;
public static int k = 0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
a = sc.nextInt(); //1のカード枚数
b = sc.nextInt(); //0のカード枚数
c = sc.nextInt(); //-1のカード枚数
k = sc.nextInt(); //引くカードの枚数
k = calc(a,k, 1);
k = calc(b,k, 0);
k = calc(c,k, -1);
System.out.println(result);
}
public static int calc(int num, int k , int card){
if(k==0) return k;
if(num >= k){
result += k*card;
k=0;
}else {
result += num*card;
k-=num;
}
return k;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
17,
41,
13,
20,
17,
42,
2,
13,
17,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
40,
13,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
4,
13,
13,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
30,
0,
13,
2,
13,
2,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
29,
23,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
152,
8
],
[
152,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
33,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
11,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
46,
57
],
[
57,
58
],
[
11,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
11,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
11,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
11,
79
],
[
79,
80
],
[
79,
81
],
[
79,
82
],
[
79,
83
],
[
79,
84
],
[
11,
85
],
[
85,
86
],
[
86,
87
],
[
9,
88
],
[
88,
89
],
[
152,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
92,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
101,
108
],
[
97,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
115,
122
],
[
109,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
123,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
123,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
123,
142
],
[
90,
143
],
[
143,
144
],
[
90,
145
],
[
145,
146
],
[
90,
147
],
[
147,
148
],
[
90,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] |
[
"import java.util.Scanner;\nimport java.util.ArrayList;\n \npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int i = 0;\n int a,b,c,k;\n String an = scan.nextLine();\n String atai[] = an.split(\" \",0);\n int num[] = new int[4];\n while(i < 4){\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }\n a = num[0];\n b = num[1];\n c = num[2];\n k = num[3];\n maxCal(a,b,c,k);\n scan.close();\n }\n \n public static void maxCal(int A , int B, int C, int K){ \n int S,T;\n if(A >= K){\n System.out.println(K);\n return;\n }else if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int i = 0;\n int a,b,c,k;\n String an = scan.nextLine();\n String atai[] = an.split(\" \",0);\n int num[] = new int[4];\n while(i < 4){\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }\n a = num[0];\n b = num[1];\n c = num[2];\n k = num[3];\n maxCal(a,b,c,k);\n scan.close();\n }\n \n public static void maxCal(int A , int B, int C, int K){ \n int S,T;\n if(A >= K){\n System.out.println(K);\n return;\n }else if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int i = 0;\n int a,b,c,k;\n String an = scan.nextLine();\n String atai[] = an.split(\" \",0);\n int num[] = new int[4];\n while(i < 4){\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }\n a = num[0];\n b = num[1];\n c = num[2];\n k = num[3];\n maxCal(a,b,c,k);\n scan.close();\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int i = 0;\n int a,b,c,k;\n String an = scan.nextLine();\n String atai[] = an.split(\" \",0);\n int num[] = new int[4];\n while(i < 4){\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }\n a = num[0];\n b = num[1];\n c = num[2];\n k = num[3];\n maxCal(a,b,c,k);\n scan.close();\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int i = 0;",
"i",
"0",
"int a",
"a",
"b",
"b",
"c",
"c",
"k;",
"k",
"String an = scan.nextLine();",
"an",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String atai[] = an.split(\" \",0);",
"atai",
"an.split(\" \",0)",
"an.split",
"an",
"\" \"",
"0",
"int num[] = new int[4];",
"num",
"new int[4]",
"4",
"while(i < 4){\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }",
"i < 4",
"i",
"4",
"{\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }",
"num[i] = Integer.parseInt(atai[i])",
"num[i]",
"num",
"i",
"Integer.parseInt(atai[i])",
"Integer.parseInt",
"Integer",
"atai[i]",
"atai",
"i",
"i++",
"i",
"a = num[0]",
"a",
"num[0]",
"num",
"0",
"b = num[1]",
"b",
"num[1]",
"num",
"1",
"c = num[2]",
"c",
"num[2]",
"num",
"2",
"k = num[3]",
"k",
"num[3]",
"num",
"3",
"maxCal(a,b,c,k)",
"maxCal",
"a",
"b",
"c",
"k",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public static void maxCal(int A , int B, int C, int K){ \n int S,T;\n if(A >= K){\n System.out.println(K);\n return;\n }else if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }\n }",
"maxCal",
"{ \n int S,T;\n if(A >= K){\n System.out.println(K);\n return;\n }else if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }\n }",
"int S",
"S",
"T;",
"T",
"if(A >= K){\n System.out.println(K);\n return;\n }else if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }",
"A >= K",
"A",
"K",
"{\n System.out.println(K);\n return;\n }",
"System.out.println(K)",
"System.out.println",
"System.out",
"System",
"System.out",
"K",
"return;",
"if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }",
"(A+B) >= K",
"(A+B)",
"A",
"B",
"K",
"{\n System.out.println(A);\n return;\n }",
"System.out.println(A)",
"System.out.println",
"System.out",
"System",
"System.out",
"A",
"return;",
"{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }",
"S = K-(A+B)",
"S",
"K-(A+B)",
"K",
"(A+B)",
"A",
"B",
"T = A - S",
"T",
"A - S",
"A",
"S",
"System.out.println(T)",
"System.out.println",
"System.out",
"System",
"System.out",
"T",
"return;",
"int A",
"A",
"int B",
"B",
"int C",
"C",
"int K",
"K",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int i = 0;\n int a,b,c,k;\n String an = scan.nextLine();\n String atai[] = an.split(\" \",0);\n int num[] = new int[4];\n while(i < 4){\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }\n a = num[0];\n b = num[1];\n c = num[2];\n k = num[3];\n maxCal(a,b,c,k);\n scan.close();\n }\n \n public static void maxCal(int A , int B, int C, int K){ \n int S,T;\n if(A >= K){\n System.out.println(K);\n return;\n }else if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int i = 0;\n int a,b,c,k;\n String an = scan.nextLine();\n String atai[] = an.split(\" \",0);\n int num[] = new int[4];\n while(i < 4){\n // System.out.println(atai[i]);\n num[i] = Integer.parseInt(atai[i]);\n i++;\n }\n a = num[0];\n b = num[1];\n c = num[2];\n k = num[3];\n maxCal(a,b,c,k);\n scan.close();\n }\n \n public static void maxCal(int A , int B, int C, int K){ \n int S,T;\n if(A >= K){\n System.out.println(K);\n return;\n }else if((A+B) >= K){\n System.out.println(A);\n return;\n }else{\n S = K-(A+B);\n T = A - S;\n System.out.println(T);\n return;\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int i = 0;
int a,b,c,k;
String an = scan.nextLine();
String atai[] = an.split(" ",0);
int num[] = new int[4];
while(i < 4){
// System.out.println(atai[i]);
num[i] = Integer.parseInt(atai[i]);
i++;
}
a = num[0];
b = num[1];
c = num[2];
k = num[3];
maxCal(a,b,c,k);
scan.close();
}
public static void maxCal(int A , int B, int C, int K){
int S,T;
if(A >= K){
System.out.println(K);
return;
}else if((A+B) >= K){
System.out.println(A);
return;
}else{
S = K-(A+B);
T = A - S;
System.out.println(T);
return;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
30,
0,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
43,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
50,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
8,
80
],
[
80,
81
],
[
81,
82
],
[
6,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint a = kb.nextInt();\n\t\tint b = kb.nextInt();\n\t\tint c = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tint count = 0;\n\t\tif (k <= a) {\n\t\t\tcount += k;\n\t\t} else {\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tkb.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint a = kb.nextInt();\n\t\tint b = kb.nextInt();\n\t\tint c = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tint count = 0;\n\t\tif (k <= a) {\n\t\t\tcount += k;\n\t\t} else {\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tkb.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint a = kb.nextInt();\n\t\tint b = kb.nextInt();\n\t\tint c = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tint count = 0;\n\t\tif (k <= a) {\n\t\t\tcount += k;\n\t\t} else {\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tkb.close();\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint a = kb.nextInt();\n\t\tint b = kb.nextInt();\n\t\tint c = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tint count = 0;\n\t\tif (k <= a) {\n\t\t\tcount += k;\n\t\t} else {\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tkb.close();\n\t}",
"Scanner kb = new Scanner(System.in);",
"kb",
"new Scanner(System.in)",
"int a = kb.nextInt();",
"a",
"kb.nextInt()",
"kb.nextInt",
"kb",
"int b = kb.nextInt();",
"b",
"kb.nextInt()",
"kb.nextInt",
"kb",
"int c = kb.nextInt();",
"c",
"kb.nextInt()",
"kb.nextInt",
"kb",
"int k = kb.nextInt();",
"k",
"kb.nextInt()",
"kb.nextInt",
"kb",
"int count = 0;",
"count",
"0",
"if (k <= a) {\n\t\t\tcount += k;\n\t\t} else {\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"k <= a",
"k",
"a",
"{\n\t\t\tcount += k;\n\t\t}",
"count += k",
"count",
"k",
"{\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"count += a",
"count",
"a",
"k -= a",
"k",
"a",
"if (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}",
"k <= b",
"k",
"b",
"{\n\t\t\t}",
"{\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}",
"k -= b",
"k",
"b",
"if (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}",
"k <= c",
"k",
"c",
"{\n\t\t\t\t\tcount -= k;\n\t\t\t\t}",
"count -= k",
"count",
"k",
"{\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}",
"count -= c",
"count",
"c",
"k -= c",
"k",
"c",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"kb.close()",
"kb.close",
"kb",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint a = kb.nextInt();\n\t\tint b = kb.nextInt();\n\t\tint c = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tint count = 0;\n\t\tif (k <= a) {\n\t\t\tcount += k;\n\t\t} else {\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tkb.close();\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner kb = new Scanner(System.in);\n\t\tint a = kb.nextInt();\n\t\tint b = kb.nextInt();\n\t\tint c = kb.nextInt();\n\t\tint k = kb.nextInt();\n\t\tint count = 0;\n\t\tif (k <= a) {\n\t\t\tcount += k;\n\t\t} else {\n\t\t\tcount += a;\n\t\t\tk -= a;\n\t\t\tif (k <= b) {\n\t\t\t} else {\n\t\t\t\tk -= b;\n\t\t\t\tif (k <= c) {\n\t\t\t\t\tcount -= k;\n\t\t\t\t} else {\n\t\t\t\t\tcount -= c;\n\t\t\t\t\tk -= c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tkb.close();\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner kb = new Scanner(System.in);
int a = kb.nextInt();
int b = kb.nextInt();
int c = kb.nextInt();
int k = kb.nextInt();
int count = 0;
if (k <= a) {
count += k;
} else {
count += a;
k -= a;
if (k <= b) {
} else {
k -= b;
if (k <= c) {
count -= k;
} else {
count -= c;
k -= c;
}
}
}
System.out.println(count);
kb.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
20,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
2,
13,
2,
13,
40,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
145,
5
],
[
145,
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
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
8,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
65,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
65,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
87,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
8,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
109,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
128,
130
],
[
8,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
6,
142
],
[
142,
143
],
[
0,
144
],
[
144,
145
],
[
144,
146
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint A = 0, B = 0, C = 0, K = 0;\n\t\tint a = 0, b = 0, c = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tA = Integer.parseInt(sc.next());\n\t\tB = Integer.parseInt(sc.next());\n\t\tC = Integer.parseInt(sc.next());\n\t\tK = Integer.parseInt(sc.next());\n\t\tif (K - A >= 0) {\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t} else {\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - B >= 0) {\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t} else {\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - C >= 0) {\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t} else {\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}\n\t\tSystem.out.println(a + c * (-1));\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint A = 0, B = 0, C = 0, K = 0;\n\t\tint a = 0, b = 0, c = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tA = Integer.parseInt(sc.next());\n\t\tB = Integer.parseInt(sc.next());\n\t\tC = Integer.parseInt(sc.next());\n\t\tK = Integer.parseInt(sc.next());\n\t\tif (K - A >= 0) {\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t} else {\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - B >= 0) {\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t} else {\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - C >= 0) {\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t} else {\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}\n\t\tSystem.out.println(a + c * (-1));\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tint A = 0, B = 0, C = 0, K = 0;\n\t\tint a = 0, b = 0, c = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tA = Integer.parseInt(sc.next());\n\t\tB = Integer.parseInt(sc.next());\n\t\tC = Integer.parseInt(sc.next());\n\t\tK = Integer.parseInt(sc.next());\n\t\tif (K - A >= 0) {\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t} else {\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - B >= 0) {\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t} else {\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - C >= 0) {\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t} else {\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}\n\t\tSystem.out.println(a + c * (-1));\n\t}",
"main",
"{\n\t\tint A = 0, B = 0, C = 0, K = 0;\n\t\tint a = 0, b = 0, c = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tA = Integer.parseInt(sc.next());\n\t\tB = Integer.parseInt(sc.next());\n\t\tC = Integer.parseInt(sc.next());\n\t\tK = Integer.parseInt(sc.next());\n\t\tif (K - A >= 0) {\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t} else {\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - B >= 0) {\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t} else {\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - C >= 0) {\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t} else {\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}\n\t\tSystem.out.println(a + c * (-1));\n\t}",
"int A = 0",
"A",
"0",
"B = 0",
"B",
"0",
"C = 0",
"C",
"0",
"K = 0;",
"K",
"0",
"int a = 0",
"a",
"0",
"b = 0",
"b",
"0",
"c = 0;",
"c",
"0",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"A = Integer.parseInt(sc.next())",
"A",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"B = Integer.parseInt(sc.next())",
"B",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"C = Integer.parseInt(sc.next())",
"C",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"K = Integer.parseInt(sc.next())",
"K",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"if (K - A >= 0) {\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t} else {\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}",
"K - A >= 0",
"K - A",
"K",
"A",
"0",
"{\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t}",
"a = A",
"a",
"A",
"K = K - A",
"K",
"K - A",
"K",
"A",
"{\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}",
"a = K",
"a",
"K",
"K = 0",
"K",
"0",
"if (K - B >= 0) {\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t} else {\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}",
"K - B >= 0",
"K - B",
"K",
"B",
"0",
"{\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t}",
"b = B",
"b",
"B",
"K = K - B",
"K",
"K - B",
"K",
"B",
"{\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}",
"b = K",
"b",
"K",
"K = 0",
"K",
"0",
"if (K - C >= 0) {\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t} else {\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}",
"K - C >= 0",
"K - C",
"K",
"C",
"0",
"{\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t}",
"c = C",
"c",
"C",
"K = K - C",
"K",
"K - C",
"K",
"C",
"{\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}",
"c = K",
"c",
"K",
"K = 0",
"K",
"0",
"System.out.println(a + c * (-1))",
"System.out.println",
"System.out",
"System",
"System.out",
"a + c * (-1)",
"a",
"c * (-1)",
"c",
"(-1)",
"1",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint A = 0, B = 0, C = 0, K = 0;\n\t\tint a = 0, b = 0, c = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tA = Integer.parseInt(sc.next());\n\t\tB = Integer.parseInt(sc.next());\n\t\tC = Integer.parseInt(sc.next());\n\t\tK = Integer.parseInt(sc.next());\n\t\tif (K - A >= 0) {\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t} else {\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - B >= 0) {\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t} else {\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - C >= 0) {\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t} else {\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}\n\t\tSystem.out.println(a + c * (-1));\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint A = 0, B = 0, C = 0, K = 0;\n\t\tint a = 0, b = 0, c = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tA = Integer.parseInt(sc.next());\n\t\tB = Integer.parseInt(sc.next());\n\t\tC = Integer.parseInt(sc.next());\n\t\tK = Integer.parseInt(sc.next());\n\t\tif (K - A >= 0) {\n\t\t\ta = A;\n\t\t\tK = K - A;\n\t\t} else {\n\t\t\ta = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - B >= 0) {\n\t\t\tb = B;\n\t\t\tK = K - B;\n\t\t} else {\n\t\t\tb = K;\n\t\t\tK = 0;\n\t\t}\n\t\tif (K - C >= 0) {\n\t\t\tc = C;\n\t\t\tK = K - C;\n\t\t} else {\n\t\t\tc = K;\n\t\t\tK = 0;\n\t\t}\n\t\tSystem.out.println(a + c * (-1));\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int A = 0, B = 0, C = 0, K = 0;
int a = 0, b = 0, c = 0;
Scanner sc = new Scanner(System.in);
A = Integer.parseInt(sc.next());
B = Integer.parseInt(sc.next());
C = Integer.parseInt(sc.next());
K = Integer.parseInt(sc.next());
if (K - A >= 0) {
a = A;
K = K - A;
} else {
a = K;
K = 0;
}
if (K - B >= 0) {
b = B;
K = K - B;
} else {
b = K;
K = 0;
}
if (K - C >= 0) {
c = C;
K = K - C;
} else {
c = K;
K = 0;
}
System.out.println(a + c * (-1));
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
12,
13,
30,
41,
13,
17,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
13,
13,
30,
0,
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
],
[
80,
5
],
[
80,
6
],
[
6,
7
],
[
6,
8
],
[
80,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
80,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
80,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
80,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
80,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
31,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
44,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
53,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
40,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
31,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
29,
77
],
[
77,
78
],
[
0,
79
],
[
79,
80
],
[
79,
81
]
] |
[
"\nimport java.util.Scanner;\n\npublic class Main {\n static Scanner sc = new Scanner(System.in);\n static long a = sc.nextLong();\n static long b = sc.nextLong();\n static long c = sc.nextLong();\n static long k = sc.nextLong();\n\n public static void main(String[] args) {\n long result = 0;\n long tmp = k - a;\n if (tmp > 0){\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n } else {\n result = k;\n }\n System.out.println(result);\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n static Scanner sc = new Scanner(System.in);\n static long a = sc.nextLong();\n static long b = sc.nextLong();\n static long c = sc.nextLong();\n static long k = sc.nextLong();\n\n public static void main(String[] args) {\n long result = 0;\n long tmp = k - a;\n if (tmp > 0){\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n } else {\n result = k;\n }\n System.out.println(result);\n\n }\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static long a = sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"static long b = sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"static long c = sc.nextLong();",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"static long k = sc.nextLong();",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"public static void main(String[] args) {\n long result = 0;\n long tmp = k - a;\n if (tmp > 0){\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n } else {\n result = k;\n }\n System.out.println(result);\n\n }",
"main",
"{\n long result = 0;\n long tmp = k - a;\n if (tmp > 0){\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n } else {\n result = k;\n }\n System.out.println(result);\n\n }",
"long result = 0;",
"result",
"0",
"long tmp = k - a;",
"tmp",
"k - a",
"k",
"a",
"if (tmp > 0){\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n } else {\n result = k;\n }",
"tmp > 0",
"tmp",
"0",
"{\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n }",
"result = a",
"result",
"a",
"tmp = tmp - b",
"tmp",
"tmp - b",
"tmp",
"b",
"if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }",
"tmp > 0",
"tmp",
"0",
"{\n result = result - tmp;\n }",
"result = result - tmp",
"result",
"result - tmp",
"result",
"tmp",
"{\n result = a;\n }",
"result = a",
"result",
"a",
"{\n result = k;\n }",
"result = k",
"result",
"k",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n static Scanner sc = new Scanner(System.in);\n static long a = sc.nextLong();\n static long b = sc.nextLong();\n static long c = sc.nextLong();\n static long k = sc.nextLong();\n\n public static void main(String[] args) {\n long result = 0;\n long tmp = k - a;\n if (tmp > 0){\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n } else {\n result = k;\n }\n System.out.println(result);\n\n }\n}",
"public class Main {\n static Scanner sc = new Scanner(System.in);\n static long a = sc.nextLong();\n static long b = sc.nextLong();\n static long c = sc.nextLong();\n static long k = sc.nextLong();\n\n public static void main(String[] args) {\n long result = 0;\n long tmp = k - a;\n if (tmp > 0){\n result = a;\n tmp = tmp - b;\n if (tmp > 0){\n result = result - tmp;\n } else {\n result = a;\n }\n } else {\n result = k;\n }\n System.out.println(result);\n\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
static long a = sc.nextLong();
static long b = sc.nextLong();
static long c = sc.nextLong();
static long k = sc.nextLong();
public static void main(String[] args) {
long result = 0;
long tmp = k - a;
if (tmp > 0){
result = a;
tmp = tmp - b;
if (tmp > 0){
result = result - tmp;
} else {
result = a;
}
} else {
result = k;
}
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
13,
30,
29,
13,
30,
0,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
29,
13,
30,
0,
13,
13,
29,
2,
13,
2,
4,
18,
13,
13,
13,
40,
17,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
99,
5
],
[
99,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
12,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
26,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
41,
45
],
[
40,
46
],
[
46,
47
],
[
6,
48
],
[
48,
49
],
[
6,
50
],
[
50,
51
],
[
6,
52
],
[
52,
53
],
[
6,
54
],
[
54,
55
],
[
99,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
58,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
58,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
58,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
58,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
87,
90
],
[
87,
91
],
[
87,
92
],
[
58,
93
],
[
93,
94
],
[
94,
95
],
[
56,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n private static int sum(int aNum, int bNum, int cNum, int k) {\n int sum = 0;\n if (k <= aNum) {\n return k;\n } else {\n sum += aNum;\n k -= aNum;\n }\n\n if (k <= bNum) {\n return sum;\n } else {\n k -= bNum;\n }\n\n return sum + Math.min(k, cNum) * -1;\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int aNum = sc.nextInt(), bNum = sc.nextInt(), cNum = sc.nextInt(), k = sc.nextInt();\n\n System.out.println(sum(aNum, bNum, cNum, k));\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n private static int sum(int aNum, int bNum, int cNum, int k) {\n int sum = 0;\n if (k <= aNum) {\n return k;\n } else {\n sum += aNum;\n k -= aNum;\n }\n\n if (k <= bNum) {\n return sum;\n } else {\n k -= bNum;\n }\n\n return sum + Math.min(k, cNum) * -1;\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int aNum = sc.nextInt(), bNum = sc.nextInt(), cNum = sc.nextInt(), k = sc.nextInt();\n\n System.out.println(sum(aNum, bNum, cNum, k));\n sc.close();\n }\n}",
"Main",
"private static int sum(int aNum, int bNum, int cNum, int k) {\n int sum = 0;\n if (k <= aNum) {\n return k;\n } else {\n sum += aNum;\n k -= aNum;\n }\n\n if (k <= bNum) {\n return sum;\n } else {\n k -= bNum;\n }\n\n return sum + Math.min(k, cNum) * -1;\n }",
"sum",
"{\n int sum = 0;\n if (k <= aNum) {\n return k;\n } else {\n sum += aNum;\n k -= aNum;\n }\n\n if (k <= bNum) {\n return sum;\n } else {\n k -= bNum;\n }\n\n return sum + Math.min(k, cNum) * -1;\n }",
"int sum = 0;",
"sum",
"0",
"if (k <= aNum) {\n return k;\n } else {\n sum += aNum;\n k -= aNum;\n }",
"k <= aNum",
"k",
"aNum",
"{\n return k;\n }",
"return k;",
"k",
"{\n sum += aNum;\n k -= aNum;\n }",
"sum += aNum",
"sum",
"aNum",
"k -= aNum",
"k",
"aNum",
"if (k <= bNum) {\n return sum;\n } else {\n k -= bNum;\n }",
"k <= bNum",
"k",
"bNum",
"{\n return sum;\n }",
"return sum;",
"sum",
"{\n k -= bNum;\n }",
"k -= bNum",
"k",
"bNum",
"return sum + Math.min(k, cNum) * -1;",
"sum + Math.min(k, cNum) * -1",
"sum",
"Math.min(k, cNum) * -1",
"Math.min(k, cNum)",
"Math.min",
"Math",
"k",
"cNum",
"-1",
"1",
"int aNum",
"aNum",
"int bNum",
"bNum",
"int cNum",
"cNum",
"int k",
"k",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int aNum = sc.nextInt(), bNum = sc.nextInt(), cNum = sc.nextInt(), k = sc.nextInt();\n\n System.out.println(sum(aNum, bNum, cNum, k));\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int aNum = sc.nextInt(), bNum = sc.nextInt(), cNum = sc.nextInt(), k = sc.nextInt();\n\n System.out.println(sum(aNum, bNum, cNum, k));\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int aNum = sc.nextInt()",
"aNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"bNum = sc.nextInt()",
"bNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"cNum = sc.nextInt()",
"cNum",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(sum(aNum, bNum, cNum, k))",
"System.out.println",
"System.out",
"System",
"System.out",
"sum(aNum, bNum, cNum, k)",
"sum",
"aNum",
"bNum",
"cNum",
"k",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n private static int sum(int aNum, int bNum, int cNum, int k) {\n int sum = 0;\n if (k <= aNum) {\n return k;\n } else {\n sum += aNum;\n k -= aNum;\n }\n\n if (k <= bNum) {\n return sum;\n } else {\n k -= bNum;\n }\n\n return sum + Math.min(k, cNum) * -1;\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int aNum = sc.nextInt(), bNum = sc.nextInt(), cNum = sc.nextInt(), k = sc.nextInt();\n\n System.out.println(sum(aNum, bNum, cNum, k));\n sc.close();\n }\n}",
"public class Main {\n\n private static int sum(int aNum, int bNum, int cNum, int k) {\n int sum = 0;\n if (k <= aNum) {\n return k;\n } else {\n sum += aNum;\n k -= aNum;\n }\n\n if (k <= bNum) {\n return sum;\n } else {\n k -= bNum;\n }\n\n return sum + Math.min(k, cNum) * -1;\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int aNum = sc.nextInt(), bNum = sc.nextInt(), cNum = sc.nextInt(), k = sc.nextInt();\n\n System.out.println(sum(aNum, bNum, cNum, k));\n sc.close();\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
private static int sum(int aNum, int bNum, int cNum, int k) {
int sum = 0;
if (k <= aNum) {
return k;
} else {
sum += aNum;
k -= aNum;
}
if (k <= bNum) {
return sum;
} else {
k -= bNum;
}
return sum + Math.min(k, cNum) * -1;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int aNum = sc.nextInt(), bNum = sc.nextInt(), cNum = sc.nextInt(), k = sc.nextInt();
System.out.println(sum(aNum, bNum, cNum, k));
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
30,
0,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n if(a>=k) {\n sum = k;\n k=0;\n }else{\n sum = a;\n k -= a;\n }\n if(b>=k){\n k -= k;\n }else{\n k-=b;\n }\n if(k>0){\n sum -= k;\n }\n System.out.println(sum);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n if(a>=k) {\n sum = k;\n k=0;\n }else{\n sum = a;\n k -= a;\n }\n if(b>=k){\n k -= k;\n }else{\n k-=b;\n }\n if(k>0){\n sum -= k;\n }\n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n if(a>=k) {\n sum = k;\n k=0;\n }else{\n sum = a;\n k -= a;\n }\n if(b>=k){\n k -= k;\n }else{\n k-=b;\n }\n if(k>0){\n sum -= k;\n }\n System.out.println(sum);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n if(a>=k) {\n sum = k;\n k=0;\n }else{\n sum = a;\n k -= a;\n }\n if(b>=k){\n k -= k;\n }else{\n k-=b;\n }\n if(k>0){\n sum -= k;\n }\n System.out.println(sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"if(a>=k) {\n sum = k;\n k=0;\n }else{\n sum = a;\n k -= a;\n }",
"a>=k",
"a",
"k",
"{\n sum = k;\n k=0;\n }",
"sum = k",
"sum",
"k",
"k=0",
"k",
"0",
"{\n sum = a;\n k -= a;\n }",
"sum = a",
"sum",
"a",
"k -= a",
"k",
"a",
"if(b>=k){\n k -= k;\n }else{\n k-=b;\n }",
"b>=k",
"b",
"k",
"{\n k -= k;\n }",
"k -= k",
"k",
"k",
"{\n k-=b;\n }",
"k-=b",
"k",
"b",
"if(k>0){\n sum -= k;\n }",
"k>0",
"k",
"0",
"{\n sum -= k;\n }",
"sum -= k",
"sum",
"k",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n if(a>=k) {\n sum = k;\n k=0;\n }else{\n sum = a;\n k -= a;\n }\n if(b>=k){\n k -= k;\n }else{\n k-=b;\n }\n if(k>0){\n sum -= k;\n }\n System.out.println(sum);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n int sum = 0;\n if(a>=k) {\n sum = k;\n k=0;\n }else{\n sum = a;\n k -= a;\n }\n if(b>=k){\n k -= k;\n }else{\n k-=b;\n }\n if(k>0){\n sum -= k;\n }\n System.out.println(sum);\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();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int sum = 0;
if(a>=k) {
sum = k;
k=0;
}else{
sum = a;
k -= a;
}
if(b>=k){
k -= k;
}else{
k-=b;
}
if(k>0){
sum -= k;
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
13,
30,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
2,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
48,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
47,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
6,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
] |
[
"import java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t//最大値\n \n\t\tif(K<=A){\n\t\t\tmax = K;\n\t\t}\n\t\tif(K>A){\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}\n \n\t\tSystem.out.println(max);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t//最大値\n \n\t\tif(K<=A){\n\t\t\tmax = K;\n\t\t}\n\t\tif(K>A){\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}\n \n\t\tSystem.out.println(max);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t//最大値\n \n\t\tif(K<=A){\n\t\t\tmax = K;\n\t\t}\n\t\tif(K>A){\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}\n \n\t\tSystem.out.println(max);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t//最大値\n \n\t\tif(K<=A){\n\t\t\tmax = K;\n\t\t}\n\t\tif(K>A){\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}\n \n\t\tSystem.out.println(max);\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int A = in.nextInt();",
"A",
"in.nextInt()",
"in.nextInt",
"in",
"int B = in.nextInt();",
"B",
"in.nextInt()",
"in.nextInt",
"in",
"int C = in.nextInt();",
"C",
"in.nextInt()",
"in.nextInt",
"in",
"int K = in.nextInt();",
"K",
"in.nextInt()",
"in.nextInt",
"in",
"int max = 0;",
"max",
"0",
"if(K<=A){\n\t\t\tmax = K;\n\t\t}",
"K<=A",
"K",
"A",
"{\n\t\t\tmax = K;\n\t\t}",
"max = K",
"max",
"K",
"if(K>A){\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}",
"K>A",
"K",
"A",
"{\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}",
"if(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}",
"K<=(A+B)",
"K",
"(A+B)",
"A",
"B",
"{\n\t\t\t\tmax = A;\n\t\t\t}",
"max = A",
"max",
"A",
"if(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}",
"K>(A+B)",
"K",
"(A+B)",
"A",
"B",
"{\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}",
"max = A - (K-A-B)",
"max",
"A - (K-A-B)",
"A",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"System.out.println(max)",
"System.out.println",
"System.out",
"System",
"System.out",
"max",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t//最大値\n \n\t\tif(K<=A){\n\t\t\tmax = K;\n\t\t}\n\t\tif(K>A){\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}\n \n\t\tSystem.out.println(max);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t//最大値\n \n\t\tif(K<=A){\n\t\t\tmax = K;\n\t\t}\n\t\tif(K>A){\n\t\t\tif(K<=(A+B)){\n\t\t\t\tmax = A;\n\t\t\t}\n\t\t\tif(K>(A+B)){\n\t\t\t\tmax = A - (K-A-B);\n\t\t\t}\n\t\t}\n \n\t\tSystem.out.println(max);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int A = in.nextInt(); //1が書かれたカードの枚数
int B = in.nextInt(); //0が書かれたカードの枚数
int C = in.nextInt(); //-1が書かれたカードの枚数
int K = in.nextInt(); //取る枚数
int max = 0; //最大値
if(K<=A){
max = K;
}
if(K>A){
if(K<=(A+B)){
max = A;
}
if(K>(A+B)){
max = A - (K-A-B);
}
}
System.out.println(max);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
17,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
13,
14,
2,
13,
17,
30,
14,
2,
13,
13,
30,
0,
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
],
[
95,
5
],
[
95,
6
],
[
6,
7
],
[
6,
8
],
[
95,
11
],
[
11,
12
],
[
11,
13
],
[
95,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
16,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
16,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
16,
40
],
[
40,
41
],
[
40,
42
],
[
16,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
43,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
16,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
16,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
16,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
14,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\tstatic int[][] gyo2=new int[100000][12];\n\tstatic int count=0;\n\t@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tlong A=sc.nextLong();\n\t\tlong B=sc.nextLong();\n\t\tlong C=sc.nextLong();\n\t\tlong K=sc.nextLong();\n\t\tlong ans=0;\n\t\tif(K>A) {\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}else {\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}\n\t\tif(K>0) {\n\t\t\tK-=B;\n\t\t}\n\t\tif(K>0) {\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic int[][] gyo2=new int[100000][12];\n\tstatic int count=0;\n\t@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tlong A=sc.nextLong();\n\t\tlong B=sc.nextLong();\n\t\tlong C=sc.nextLong();\n\t\tlong K=sc.nextLong();\n\t\tlong ans=0;\n\t\tif(K>A) {\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}else {\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}\n\t\tif(K>0) {\n\t\t\tK-=B;\n\t\t}\n\t\tif(K>0) {\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n}\n\n}",
"Main",
"static int[][] gyo2=new int[100000][12];",
"gyo2",
"new int[100000][12]",
"100000",
"12",
"static int count=0;",
"count",
"0",
"@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tlong A=sc.nextLong();\n\t\tlong B=sc.nextLong();\n\t\tlong C=sc.nextLong();\n\t\tlong K=sc.nextLong();\n\t\tlong ans=0;\n\t\tif(K>A) {\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}else {\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}\n\t\tif(K>0) {\n\t\t\tK-=B;\n\t\t}\n\t\tif(K>0) {\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tlong A=sc.nextLong();\n\t\tlong B=sc.nextLong();\n\t\tlong C=sc.nextLong();\n\t\tlong K=sc.nextLong();\n\t\tlong ans=0;\n\t\tif(K>A) {\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}else {\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}\n\t\tif(K>0) {\n\t\t\tK-=B;\n\t\t}\n\t\tif(K>0) {\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long A=sc.nextLong();",
"A",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long B=sc.nextLong();",
"B",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long C=sc.nextLong();",
"C",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long K=sc.nextLong();",
"K",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long ans=0;",
"ans",
"0",
"if(K>A) {\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}else {\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}",
"K>A",
"K",
"A",
"{\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}",
"ans+=A",
"ans",
"A",
"K-=A",
"K",
"A",
"{\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}",
"ans+=K",
"ans",
"K",
"K=0",
"K",
"0",
"if(K>0) {\n\t\t\tK-=B;\n\t\t}",
"K>0",
"K",
"0",
"{\n\t\t\tK-=B;\n\t\t}",
"K-=B",
"K",
"B",
"if(K>0) {\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}",
"K>0",
"K",
"0",
"{\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}",
"if(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}",
"K>C",
"K",
"C",
"{\n\t\t\t\tans-=C;\n\t\t\t}",
"ans-=C",
"ans",
"C",
"{\n\t\t\t\tans-=K;\n\t\t\t}",
"ans-=K",
"ans",
"K",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tstatic int[][] gyo2=new int[100000][12];\n\tstatic int count=0;\n\t@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tlong A=sc.nextLong();\n\t\tlong B=sc.nextLong();\n\t\tlong C=sc.nextLong();\n\t\tlong K=sc.nextLong();\n\t\tlong ans=0;\n\t\tif(K>A) {\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}else {\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}\n\t\tif(K>0) {\n\t\t\tK-=B;\n\t\t}\n\t\tif(K>0) {\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n}\n\n}",
"public class Main {\n\tstatic int[][] gyo2=new int[100000][12];\n\tstatic int count=0;\n\t@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tlong A=sc.nextLong();\n\t\tlong B=sc.nextLong();\n\t\tlong C=sc.nextLong();\n\t\tlong K=sc.nextLong();\n\t\tlong ans=0;\n\t\tif(K>A) {\n\t\t\tans+=A;\n\t\t\tK-=A;\n\t\t}else {\n\t\t\tans+=K;\n\t\t\tK=0;\n\t\t}\n\t\tif(K>0) {\n\t\t\tK-=B;\n\t\t}\n\t\tif(K>0) {\n\t\t\tif(K>C) {\n\t\t\t\tans-=C;\n\t\t\t}else {\n\t\t\t\tans-=K;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\n}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
static int[][] gyo2=new int[100000][12];
static int count=0;
@SuppressWarnings("resource")
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
long A=sc.nextLong();
long B=sc.nextLong();
long C=sc.nextLong();
long K=sc.nextLong();
long ans=0;
if(K>A) {
ans+=A;
K-=A;
}else {
ans+=K;
K=0;
}
if(K>0) {
K-=B;
}
if(K>0) {
if(K>C) {
ans-=C;
}else {
ans-=K;
}
}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
6,
69
],
[
69,
70
],
[
0,
71
],
[
71,
72
],
[
71,
73
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tlong a = scan.nextLong();\n\t\tlong b = scan.nextLong();\n\t\tlong c = scan.nextLong();\n\t\tlong k = scan.nextLong();\n\t\tlong ans = 0;\n\t\t\n\t\tif(k <= a) {\n\t\t\tans = k;\n\t\t}\n\t\telse if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(ans);\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 scan = new Scanner(System.in);\n\t\t\n\t\tlong a = scan.nextLong();\n\t\tlong b = scan.nextLong();\n\t\tlong c = scan.nextLong();\n\t\tlong k = scan.nextLong();\n\t\tlong ans = 0;\n\t\t\n\t\tif(k <= a) {\n\t\t\tans = k;\n\t\t}\n\t\telse if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tlong a = scan.nextLong();\n\t\tlong b = scan.nextLong();\n\t\tlong c = scan.nextLong();\n\t\tlong k = scan.nextLong();\n\t\tlong ans = 0;\n\t\t\n\t\tif(k <= a) {\n\t\t\tans = k;\n\t\t}\n\t\telse if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tlong a = scan.nextLong();\n\t\tlong b = scan.nextLong();\n\t\tlong c = scan.nextLong();\n\t\tlong k = scan.nextLong();\n\t\tlong ans = 0;\n\t\t\n\t\tif(k <= a) {\n\t\t\tans = k;\n\t\t}\n\t\telse if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"long a = scan.nextLong();",
"a",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long b = scan.nextLong();",
"b",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long c = scan.nextLong();",
"c",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long k = scan.nextLong();",
"k",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long ans = 0;",
"ans",
"0",
"if(k <= a) {\n\t\t\tans = k;\n\t\t}\n\t\telse if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}",
"k <= a",
"k",
"a",
"{\n\t\t\tans = k;\n\t\t}",
"ans = k",
"ans",
"k",
"if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}",
"k <= a + b",
"k",
"a + b",
"a",
"b",
"{\n\t\t\tans = a;\n\t\t}",
"ans = a",
"ans",
"a",
"{\n\t\t\tans = a - (k - a - b);\n\t\t}",
"ans = a - (k - a - b)",
"ans",
"a - (k - a - b)",
"a",
"(k - a - b)",
"k - a - b",
"k",
"a",
"b",
"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 scan = new Scanner(System.in);\n\t\t\n\t\tlong a = scan.nextLong();\n\t\tlong b = scan.nextLong();\n\t\tlong c = scan.nextLong();\n\t\tlong k = scan.nextLong();\n\t\tlong ans = 0;\n\t\t\n\t\tif(k <= a) {\n\t\t\tans = k;\n\t\t}\n\t\telse if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tlong a = scan.nextLong();\n\t\tlong b = scan.nextLong();\n\t\tlong c = scan.nextLong();\n\t\tlong k = scan.nextLong();\n\t\tlong ans = 0;\n\t\t\n\t\tif(k <= a) {\n\t\t\tans = k;\n\t\t}\n\t\telse if(k <= a + b) {\n\t\t\tans = a;\n\t\t}\n\t\telse {\n\t\t\tans = a - (k - a - b);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
long a = scan.nextLong();
long b = scan.nextLong();
long c = scan.nextLong();
long k = scan.nextLong();
long ans = 0;
if(k <= a) {
ans = k;
}
else if(k <= a + b) {
ans = a;
}
else {
ans = a - (k - a - b);
}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
2,
17,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
46,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
65,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n sc.close();\n if(a > k){\n System.out.println(k);\n }else if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\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 a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n sc.close();\n if(a > k){\n System.out.println(k);\n }else if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n sc.close();\n if(a > k){\n System.out.println(k);\n }else if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n sc.close();\n if(a > k){\n System.out.println(k);\n }else if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\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 = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"if(a > k){\n System.out.println(k);\n }else if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\n }",
"a > k",
"a",
"k",
"{\n System.out.println(k);\n }",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\n }",
"a + b > k",
"a + b",
"a",
"b",
"k",
"{\n System.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"{\n System.out.println(2 * a - k + b);\n }",
"System.out.println(2 * a - k + b)",
"System.out.println",
"System.out",
"System",
"System.out",
"2 * a - k + b",
"2 * a - k",
"2 * a",
"2",
"a",
"k",
"b",
"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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n sc.close();\n if(a > k){\n System.out.println(k);\n }else if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\n }\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n sc.close();\n if(a > k){\n System.out.println(k);\n }else if(a + b > k){\n System.out.println(a);\n }else{\n System.out.println(2 * a - k + b);\n }\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();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
sc.close();
if(a > k){
System.out.println(k);
}else if(a + b > k){
System.out.println(a);
}else{
System.out.println(2 * a - k + b);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
6,
69
],
[
69,
70
],
[
0,
71
],
[
71,
72
],
[
71,
73
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tlong A = s.nextInt();\n\t\tlong B = s.nextInt();\n\t\tlong C = s.nextInt();\n\t\tlong K = s.nextInt();\n\t\t\n\t\tlong ans =0;\n\t\t\n\t\tif(K <= A) {ans =K;}\n\t\telse if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tlong A = s.nextInt();\n\t\tlong B = s.nextInt();\n\t\tlong C = s.nextInt();\n\t\tlong K = s.nextInt();\n\t\t\n\t\tlong ans =0;\n\t\t\n\t\tif(K <= A) {ans =K;}\n\t\telse if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tlong A = s.nextInt();\n\t\tlong B = s.nextInt();\n\t\tlong C = s.nextInt();\n\t\tlong K = s.nextInt();\n\t\t\n\t\tlong ans =0;\n\t\t\n\t\tif(K <= A) {ans =K;}\n\t\telse if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}\n\t\t\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner s = new Scanner(System.in);\n\t\tlong A = s.nextInt();\n\t\tlong B = s.nextInt();\n\t\tlong C = s.nextInt();\n\t\tlong K = s.nextInt();\n\t\t\n\t\tlong ans =0;\n\t\t\n\t\tif(K <= A) {ans =K;}\n\t\telse if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}\n\t\t\n\t\tSystem.out.println(ans);\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"long A = s.nextInt();",
"A",
"s.nextInt()",
"s.nextInt",
"s",
"long B = s.nextInt();",
"B",
"s.nextInt()",
"s.nextInt",
"s",
"long C = s.nextInt();",
"C",
"s.nextInt()",
"s.nextInt",
"s",
"long K = s.nextInt();",
"K",
"s.nextInt()",
"s.nextInt",
"s",
"long ans =0;",
"ans",
"0",
"if(K <= A) {ans =K;}\n\t\telse if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}",
"K <= A",
"K",
"A",
"{ans =K;}",
"ans =K",
"ans",
"K",
"if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}",
"K <= A+B",
"K",
"A+B",
"A",
"B",
"{ans = A;}",
"ans = A",
"ans",
"A",
"{ans = A-(K-A-B);}",
"ans = A-(K-A-B)",
"ans",
"A-(K-A-B)",
"A",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"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\t\tScanner s = new Scanner(System.in);\n\t\tlong A = s.nextInt();\n\t\tlong B = s.nextInt();\n\t\tlong C = s.nextInt();\n\t\tlong K = s.nextInt();\n\t\t\n\t\tlong ans =0;\n\t\t\n\t\tif(K <= A) {ans =K;}\n\t\telse if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tlong A = s.nextInt();\n\t\tlong B = s.nextInt();\n\t\tlong C = s.nextInt();\n\t\tlong K = s.nextInt();\n\t\t\n\t\tlong ans =0;\n\t\t\n\t\tif(K <= A) {ans =K;}\n\t\telse if(K <= A+B) {ans = A;}\n\t\telse {ans = A-(K-A-B);}\n\t\t\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
long A = s.nextInt();
long B = s.nextInt();
long C = s.nextInt();
long K = s.nextInt();
long ans =0;
if(K <= A) {ans =K;}
else if(K <= A+B) {ans = A;}
else {ans = A-(K-A-B);}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
2,
2,
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
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
44,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
55,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tlong A = in.nextLong();\n\t\tlong B = in.nextLong();\n\t\tlong C = in.nextLong();\n\t\tlong K = in.nextLong();\n\t\t\n\t\t\n\t\t//[1,2,3] K=4\n\t\t\n\t\tif (K<A) {\n\t\t\tSystem.out.println(K);\n\t\t} else {\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\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 Scanner(System.in);\n\t\t\n\t\tlong A = in.nextLong();\n\t\tlong B = in.nextLong();\n\t\tlong C = in.nextLong();\n\t\tlong K = in.nextLong();\n\t\t\n\t\t\n\t\t//[1,2,3] K=4\n\t\t\n\t\tif (K<A) {\n\t\t\tSystem.out.println(K);\n\t\t} else {\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tlong A = in.nextLong();\n\t\tlong B = in.nextLong();\n\t\tlong C = in.nextLong();\n\t\tlong K = in.nextLong();\n\t\t\n\t\t\n\t\t//[1,2,3] K=4\n\t\t\n\t\tif (K<A) {\n\t\t\tSystem.out.println(K);\n\t\t} else {\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tlong A = in.nextLong();\n\t\tlong B = in.nextLong();\n\t\tlong C = in.nextLong();\n\t\tlong K = in.nextLong();\n\t\t\n\t\t\n\t\t//[1,2,3] K=4\n\t\t\n\t\tif (K<A) {\n\t\t\tSystem.out.println(K);\n\t\t} else {\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"long A = in.nextLong();",
"A",
"in.nextLong()",
"in.nextLong",
"in",
"long B = in.nextLong();",
"B",
"in.nextLong()",
"in.nextLong",
"in",
"long C = in.nextLong();",
"C",
"in.nextLong()",
"in.nextLong",
"in",
"long K = in.nextLong();",
"K",
"in.nextLong()",
"in.nextLong",
"in",
"if (K<A) {\n\t\t\tSystem.out.println(K);\n\t\t} else {\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}",
"K<A",
"K",
"A",
"{\n\t\t\tSystem.out.println(K);\n\t\t}",
"System.out.println(K)",
"System.out.println",
"System.out",
"System",
"System.out",
"K",
"{\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}",
"if (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}",
"K==A",
"K",
"A",
"{\n\t\t\t\tSystem.out.println(A);\n\t\t\t}",
"System.out.println(A)",
"System.out.println",
"System.out",
"System",
"System.out",
"A",
"if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}",
"A+B >= K",
"A+B",
"A",
"B",
"K",
"{\n\t\t\t\tSystem.out.println(A);\n\t\t\t}",
"System.out.println(A)",
"System.out.println",
"System.out",
"System",
"System.out",
"A",
"{\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}",
"System.out.println(A - (K-A-B))",
"System.out.println",
"System.out",
"System",
"System.out",
"A - (K-A-B)",
"A",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tlong A = in.nextLong();\n\t\tlong B = in.nextLong();\n\t\tlong C = in.nextLong();\n\t\tlong K = in.nextLong();\n\t\t\n\t\t\n\t\t//[1,2,3] K=4\n\t\t\n\t\tif (K<A) {\n\t\t\tSystem.out.println(K);\n\t\t} else {\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tlong A = in.nextLong();\n\t\tlong B = in.nextLong();\n\t\tlong C = in.nextLong();\n\t\tlong K = in.nextLong();\n\t\t\n\t\t\n\t\t//[1,2,3] K=4\n\t\t\n\t\tif (K<A) {\n\t\t\tSystem.out.println(K);\n\t\t} else {\n\t\t\tif (K==A) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else if (A+B >= K) {\n\t\t\t\tSystem.out.println(A);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(A - (K-A-B));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
long A = in.nextLong();
long B = in.nextLong();
long C = in.nextLong();
long K = in.nextLong();
//[1,2,3] K=4
if (K<A) {
System.out.println(K);
} else {
if (K==A) {
System.out.println(A);
} else if (A+B >= K) {
System.out.println(A);
} else {
System.out.println(A - (K-A-B));
}
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
13,
30,
41,
13,
2,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
13,
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
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
39,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
47,
49
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
11,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
68,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
68,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
9,
96
],
[
96,
97
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\nclass Main{\n\tpublic static void main(String args[])throws Exception\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=br.readLine();\n\t\tString str[]=s.split(\" \");\n\t\tint a=Integer.parseInt(str[0]);\n\t\tint b=Integer.parseInt(str[1]);\n\t\tint c=Integer.parseInt(str[2]);\n\t\tint k=Integer.parseInt(str[3]);\n\t\tif(a>=k)\n\t\t\tSystem.out.println(k);\n\t\telse if((a+b)>=k)\n\t\t\tSystem.out.println(a);\n\t\telse\n\t\t{\n\t\t\tint temp=k-(a+b);\n\t\t\tSystem.out.println(a-temp);\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main{\n\tpublic static void main(String args[])throws Exception\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=br.readLine();\n\t\tString str[]=s.split(\" \");\n\t\tint a=Integer.parseInt(str[0]);\n\t\tint b=Integer.parseInt(str[1]);\n\t\tint c=Integer.parseInt(str[2]);\n\t\tint k=Integer.parseInt(str[3]);\n\t\tif(a>=k)\n\t\t\tSystem.out.println(k);\n\t\telse if((a+b)>=k)\n\t\t\tSystem.out.println(a);\n\t\telse\n\t\t{\n\t\t\tint temp=k-(a+b);\n\t\t\tSystem.out.println(a-temp);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[])throws Exception\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=br.readLine();\n\t\tString str[]=s.split(\" \");\n\t\tint a=Integer.parseInt(str[0]);\n\t\tint b=Integer.parseInt(str[1]);\n\t\tint c=Integer.parseInt(str[2]);\n\t\tint k=Integer.parseInt(str[3]);\n\t\tif(a>=k)\n\t\t\tSystem.out.println(k);\n\t\telse if((a+b)>=k)\n\t\t\tSystem.out.println(a);\n\t\telse\n\t\t{\n\t\t\tint temp=k-(a+b);\n\t\t\tSystem.out.println(a-temp);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=br.readLine();\n\t\tString str[]=s.split(\" \");\n\t\tint a=Integer.parseInt(str[0]);\n\t\tint b=Integer.parseInt(str[1]);\n\t\tint c=Integer.parseInt(str[2]);\n\t\tint k=Integer.parseInt(str[3]);\n\t\tif(a>=k)\n\t\t\tSystem.out.println(k);\n\t\telse if((a+b)>=k)\n\t\t\tSystem.out.println(a);\n\t\telse\n\t\t{\n\t\t\tint temp=k-(a+b);\n\t\t\tSystem.out.println(a-temp);\n\t\t}\n\t}",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s=br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"String str[]=s.split(\" \");",
"str",
"s.split(\" \")",
"s.split",
"s",
"\" \"",
"int a=Integer.parseInt(str[0]);",
"a",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"int b=Integer.parseInt(str[1]);",
"b",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"int c=Integer.parseInt(str[2]);",
"c",
"Integer.parseInt(str[2])",
"Integer.parseInt",
"Integer",
"str[2]",
"str",
"2",
"int k=Integer.parseInt(str[3]);",
"k",
"Integer.parseInt(str[3])",
"Integer.parseInt",
"Integer",
"str[3]",
"str",
"3",
"if(a>=k)\n\t\t\tSystem.out.println(k);\n\t\telse if((a+b)>=k)\n\t\t\tSystem.out.println(a);\n\t\telse\n\t\t{\n\t\t\tint temp=k-(a+b);\n\t\t\tSystem.out.println(a-temp);\n\t\t}",
"a>=k",
"a",
"k",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if((a+b)>=k)\n\t\t\tSystem.out.println(a);\n\t\telse\n\t\t{\n\t\t\tint temp=k-(a+b);\n\t\t\tSystem.out.println(a-temp);\n\t\t}",
"(a+b)>=k",
"(a+b)",
"a",
"b",
"k",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"{\n\t\t\tint temp=k-(a+b);\n\t\t\tSystem.out.println(a-temp);\n\t\t}",
"int temp=k-(a+b);",
"temp",
"k-(a+b)",
"k",
"(a+b)",
"a",
"b",
"System.out.println(a-temp)",
"System.out.println",
"System.out",
"System",
"System.out",
"a-temp",
"a",
"temp",
"String args[]",
"args"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main{
public static void main(String args[])throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s=br.readLine();
String str[]=s.split(" ");
int a=Integer.parseInt(str[0]);
int b=Integer.parseInt(str[1]);
int c=Integer.parseInt(str[2]);
int k=Integer.parseInt(str[3]);
if(a>=k)
System.out.println(k);
else if((a+b)>=k)
System.out.println(a);
else
{
int temp=k-(a+b);
System.out.println(a-temp);
}
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
13,
13,
0,
13,
2,
13,
13,
0,
13,
17,
14,
2,
13,
13,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
99,
11
],
[
99,
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
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
14,
41
],
[
41,
42
],
[
41,
43
],
[
14,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
44,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
14,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
64,
73
],
[
73,
74
],
[
73,
75
],
[
14,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
76,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
14,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
12,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] |
[
"import java.util.*;\nimport java.lang.*;\nimport java.io.*;\npublic class Main\n { \n\t\n\tpublic static void main (String[] args)\n\t {\nScanner scan=new Scanner(System.in);\n\n\t \n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t int c=scan.nextInt();\n\t int k=scan.nextInt();\n\t int i=0;\n\t int sum=0;\n\t if(k>=a)\n\t { sum+=a;\n\t\t k=k-a;\n\t }\n\t else\n\t {sum=k;\n\t\t\tk=0;\n\t\t}\n\t\tif(k>=b)\n\t\tk=k-b;\n\t\telse k=0;\n\t\tif(k>=c)\n\t\tsum=sum-c;\n\t else sum=sum-k;\n\t \n\tSystem.out.println(sum);\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\t\n\tpublic static void main (String[] args)\n\t {\nScanner scan=new Scanner(System.in);\n\n\t \n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t int c=scan.nextInt();\n\t int k=scan.nextInt();\n\t int i=0;\n\t int sum=0;\n\t if(k>=a)\n\t { sum+=a;\n\t\t k=k-a;\n\t }\n\t else\n\t {sum=k;\n\t\t\tk=0;\n\t\t}\n\t\tif(k>=b)\n\t\tk=k-b;\n\t\telse k=0;\n\t\tif(k>=c)\n\t\tsum=sum-c;\n\t else sum=sum-k;\n\t \n\tSystem.out.println(sum);\n \n }\n\t \n\t }",
"Main",
"public static void main (String[] args)\n\t {\nScanner scan=new Scanner(System.in);\n\n\t \n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t int c=scan.nextInt();\n\t int k=scan.nextInt();\n\t int i=0;\n\t int sum=0;\n\t if(k>=a)\n\t { sum+=a;\n\t\t k=k-a;\n\t }\n\t else\n\t {sum=k;\n\t\t\tk=0;\n\t\t}\n\t\tif(k>=b)\n\t\tk=k-b;\n\t\telse k=0;\n\t\tif(k>=c)\n\t\tsum=sum-c;\n\t else sum=sum-k;\n\t \n\tSystem.out.println(sum);\n \n }",
"main",
"{\nScanner scan=new Scanner(System.in);\n\n\t \n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t int c=scan.nextInt();\n\t int k=scan.nextInt();\n\t int i=0;\n\t int sum=0;\n\t if(k>=a)\n\t { sum+=a;\n\t\t k=k-a;\n\t }\n\t else\n\t {sum=k;\n\t\t\tk=0;\n\t\t}\n\t\tif(k>=b)\n\t\tk=k-b;\n\t\telse k=0;\n\t\tif(k>=c)\n\t\tsum=sum-c;\n\t else sum=sum-k;\n\t \n\tSystem.out.println(sum);\n \n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int a=scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b=scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int c=scan.nextInt();",
"c",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k=scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int i=0;",
"i",
"0",
"int sum=0;",
"sum",
"0",
"if(k>=a)\n\t { sum+=a;\n\t\t k=k-a;\n\t }\n\t else\n\t {sum=k;\n\t\t\tk=0;\n\t\t}",
"k>=a",
"k",
"a",
"{ sum+=a;\n\t\t k=k-a;\n\t }",
"sum+=a",
"sum",
"a",
"k=k-a",
"k",
"k-a",
"k",
"a",
"{sum=k;\n\t\t\tk=0;\n\t\t}",
"sum=k",
"sum",
"k",
"k=0",
"k",
"0",
"if(k>=b)\n\t\tk=k-b;\n\t\telse k=0;",
"k>=b",
"k",
"b",
"k=k-b",
"k",
"k-b",
"k",
"b",
"k=0",
"k",
"0",
"if(k>=c)\n\t\tsum=sum-c;\n\t else sum=sum-k;",
"k>=c",
"k",
"c",
"sum=sum-c",
"sum",
"sum-c",
"sum",
"c",
"sum=sum-k",
"sum",
"sum-k",
"sum",
"k",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main\n { \n\t\n\tpublic static void main (String[] args)\n\t {\nScanner scan=new Scanner(System.in);\n\n\t \n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t int c=scan.nextInt();\n\t int k=scan.nextInt();\n\t int i=0;\n\t int sum=0;\n\t if(k>=a)\n\t { sum+=a;\n\t\t k=k-a;\n\t }\n\t else\n\t {sum=k;\n\t\t\tk=0;\n\t\t}\n\t\tif(k>=b)\n\t\tk=k-b;\n\t\telse k=0;\n\t\tif(k>=c)\n\t\tsum=sum-c;\n\t else sum=sum-k;\n\t \n\tSystem.out.println(sum);\n \n }\n\t \n\t }",
"public class Main\n { \n\t\n\tpublic static void main (String[] args)\n\t {\nScanner scan=new Scanner(System.in);\n\n\t \n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t int c=scan.nextInt();\n\t int k=scan.nextInt();\n\t int i=0;\n\t int sum=0;\n\t if(k>=a)\n\t { sum+=a;\n\t\t k=k-a;\n\t }\n\t else\n\t {sum=k;\n\t\t\tk=0;\n\t\t}\n\t\tif(k>=b)\n\t\tk=k-b;\n\t\telse k=0;\n\t\tif(k>=c)\n\t\tsum=sum-c;\n\t else sum=sum-k;\n\t \n\tSystem.out.println(sum);\n \n }\n\t \n\t }",
"Main"
] |
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
{
public static void main (String[] args)
{
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int b=scan.nextInt();
int c=scan.nextInt();
int k=scan.nextInt();
int i=0;
int sum=0;
if(k>=a)
{ sum+=a;
k=k-a;
}
else
{sum=k;
k=0;
}
if(k>=b)
k=k-b;
else k=0;
if(k>=c)
sum=sum-c;
else sum=sum-k;
System.out.println(sum);
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
17,
30,
0,
13,
13,
14,
2,
13,
17,
30,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
13,
2,
13,
40,
17,
4,
18,
18,
13,
13,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
190,
14
],
[
190,
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
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
17,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
17,
41
],
[
41,
42
],
[
17,
43
],
[
43,
44
],
[
43,
45
],
[
17,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
46,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
17,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
17,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
17,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
15,
99
],
[
99,
100
],
[
190,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
101,
105
],
[
105,
106
],
[
101,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
101,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
116,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
126,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
115,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
101,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
148,
149
],
[
101,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
157,
158
],
[
101,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
166,
167
],
[
101,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
170,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
174,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
185,
186
],
[
170,
187
],
[
187,
188
],
[
0,
189
],
[
189,
190
],
[
189,
191
]
] |
[
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main {\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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 static void main(String[] args) {\n FastReader in = new FastReader();\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long sum;\n long rem = 0;\n if(a<=k){\n rem = k-a;\n sum = a*1;\n }\n else {\n sum = k;\n }\n if(rem>0){\n if(b<=rem){\n rem = rem-b;\n }\n }\n if(rem>0){\n sum = sum + rem*(-1);\n }\n System.out.println(sum);\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",
"public class Main {\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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 static void main(String[] args) {\n FastReader in = new FastReader();\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long sum;\n long rem = 0;\n if(a<=k){\n rem = k-a;\n sum = a*1;\n }\n else {\n sum = k;\n }\n if(rem>0){\n if(b<=rem){\n rem = rem-b;\n }\n }\n if(rem>0){\n sum = sum + rem*(-1);\n }\n System.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args) {\n FastReader in = new FastReader();\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long sum;\n long rem = 0;\n if(a<=k){\n rem = k-a;\n sum = a*1;\n }\n else {\n sum = k;\n }\n if(rem>0){\n if(b<=rem){\n rem = rem-b;\n }\n }\n if(rem>0){\n sum = sum + rem*(-1);\n }\n System.out.println(sum);\n }",
"main",
"{\n FastReader in = new FastReader();\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long sum;\n long rem = 0;\n if(a<=k){\n rem = k-a;\n sum = a*1;\n }\n else {\n sum = k;\n }\n if(rem>0){\n if(b<=rem){\n rem = rem-b;\n }\n }\n if(rem>0){\n sum = sum + rem*(-1);\n }\n System.out.println(sum);\n }",
"FastReader in = new FastReader();",
"in",
"new FastReader()",
"long a = in.nextLong();",
"a",
"in.nextLong()",
"in.nextLong",
"in",
"long b = in.nextLong();",
"b",
"in.nextLong()",
"in.nextLong",
"in",
"long c = in.nextLong();",
"c",
"in.nextLong()",
"in.nextLong",
"in",
"long k = in.nextLong();",
"k",
"in.nextLong()",
"in.nextLong",
"in",
"long sum;",
"sum",
"long rem = 0;",
"rem",
"0",
"if(a<=k){\n rem = k-a;\n sum = a*1;\n }\n else {\n sum = k;\n }",
"a<=k",
"a",
"k",
"{\n rem = k-a;\n sum = a*1;\n }",
"rem = k-a",
"rem",
"k-a",
"k",
"a",
"sum = a*1",
"sum",
"a*1",
"a",
"1",
"{\n sum = k;\n }",
"sum = k",
"sum",
"k",
"if(rem>0){\n if(b<=rem){\n rem = rem-b;\n }\n }",
"rem>0",
"rem",
"0",
"{\n if(b<=rem){\n rem = rem-b;\n }\n }",
"if(b<=rem){\n rem = rem-b;\n }",
"b<=rem",
"b",
"rem",
"{\n rem = rem-b;\n }",
"rem = rem-b",
"rem",
"rem-b",
"rem",
"b",
"if(rem>0){\n sum = sum + rem*(-1);\n }",
"rem>0",
"rem",
"0",
"{\n sum = sum + rem*(-1);\n }",
"sum = sum + rem*(-1)",
"sum",
"sum + rem*(-1)",
"sum",
"rem*(-1)",
"rem",
"(-1)",
"1",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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\n InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"br = new BufferedReader(new\n InputStreamReader(System.in))",
"br",
"new BufferedReader(new\n 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 static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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 static void main(String[] args) {\n FastReader in = new FastReader();\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long sum;\n long rem = 0;\n if(a<=k){\n rem = k-a;\n sum = a*1;\n }\n else {\n sum = k;\n }\n if(rem>0){\n if(b<=rem){\n rem = rem-b;\n }\n }\n if(rem>0){\n sum = sum + rem*(-1);\n }\n System.out.println(sum);\n }\n}",
"public class Main {\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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 static void main(String[] args) {\n FastReader in = new FastReader();\n long a = in.nextLong();\n long b = in.nextLong();\n long c = in.nextLong();\n long k = in.nextLong();\n long sum;\n long rem = 0;\n if(a<=k){\n rem = k-a;\n sum = a*1;\n }\n else {\n sum = k;\n }\n if(rem>0){\n if(b<=rem){\n rem = rem-b;\n }\n }\n if(rem>0){\n sum = sum + rem*(-1);\n }\n System.out.println(sum);\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
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 in = new FastReader();
long a = in.nextLong();
long b = in.nextLong();
long c = in.nextLong();
long k = in.nextLong();
long sum;
long rem = 0;
if(a<=k){
rem = k-a;
sum = a*1;
}
else {
sum = k;
}
if(rem>0){
if(b<=rem){
rem = rem-b;
}
}
if(rem>0){
sum = sum + rem*(-1);
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
70,
5
],
[
70,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
38,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
6,
67
],
[
67,
68
],
[
0,
69
],
[
69,
70
],
[
69,
71
]
] |
[
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tboolean judje = true;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tif( K < A)\n\t\t\tsum += K;\n\t\telse\n\t\t\tsum += A;\n\n\t\tK -= (A + B);\n\n\t\tif( K > 0){\n\t\t\tsum -= K;\n\t\t}\n\t\tSystem.out.println(sum);\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\tboolean judje = true;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tif( K < A)\n\t\t\tsum += K;\n\t\telse\n\t\t\tsum += A;\n\n\t\tK -= (A + B);\n\n\t\tif( K > 0){\n\t\t\tsum -= K;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tboolean judje = true;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tif( K < A)\n\t\t\tsum += K;\n\t\telse\n\t\t\tsum += A;\n\n\t\tK -= (A + B);\n\n\t\tif( K > 0){\n\t\t\tsum -= K;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tboolean judje = true;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tif( K < A)\n\t\t\tsum += K;\n\t\telse\n\t\t\tsum += A;\n\n\t\tK -= (A + B);\n\n\t\tif( K > 0){\n\t\t\tsum -= K;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"boolean judje = true;",
"judje",
"true",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int A = scan.nextInt();",
"A",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int B = scan.nextInt();",
"B",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int C = scan.nextInt();",
"C",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K = scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int sum = 0;",
"sum",
"0",
"if( K < A)\n\t\t\tsum += K;\n\t\telse\n\t\t\tsum += A;",
"K < A",
"K",
"A",
"sum += K",
"sum",
"K",
"sum += A",
"sum",
"A",
"K -= (A + B)",
"K",
"(A + B)",
"A",
"B",
"if( K > 0){\n\t\t\tsum -= K;\n\t\t}",
"K > 0",
"K",
"0",
"{\n\t\t\tsum -= K;\n\t\t}",
"sum -= K",
"sum",
"K",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tboolean judje = true;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tif( K < A)\n\t\t\tsum += K;\n\t\telse\n\t\t\tsum += A;\n\n\t\tK -= (A + B);\n\n\t\tif( K > 0){\n\t\t\tsum -= K;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tboolean judje = true;\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint C = scan.nextInt();\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tif( K < A)\n\t\t\tsum += K;\n\t\telse\n\t\t\tsum += A;\n\n\t\tK -= (A + B);\n\n\t\tif( K > 0){\n\t\t\tsum -= K;\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
boolean judje = true;
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
int C = scan.nextInt();
int K = scan.nextInt();
int sum = 0;
if( K < A)
sum += K;
else
sum += A;
K -= (A + B);
if( K > 0){
sum -= K;
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
2,
13,
13,
2,
17,
13,
30,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
2,
13,
17,
2,
17,
13,
30,
0,
13,
2,
13,
13,
0,
13,
17,
14,
2,
2,
2,
13,
17,
2,
13,
17,
2,
17,
13,
30,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
43,
52
],
[
52,
53
],
[
52,
54
],
[
35,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
80,
81
],
[
80,
82
],
[
8,
83
],
[
83,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
89,
91
],
[
85,
92
],
[
92,
93
],
[
92,
94
],
[
83,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
6,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] |
[
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint count =0;\n\t\t\n\t\t\n\t\t\tif(A<=k && 0<k){\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\telse if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && 0<k){\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && B==0 && 0<k ){\n\t\t\t\tcount=count-k;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\n\t}\n}\n\t\t\t\t\n\t\t\t\t",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint count =0;\n\t\t\n\t\t\n\t\t\tif(A<=k && 0<k){\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\telse if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && 0<k){\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && B==0 && 0<k ){\n\t\t\t\tcount=count-k;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint count =0;\n\t\t\n\t\t\n\t\t\tif(A<=k && 0<k){\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\telse if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && 0<k){\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && B==0 && 0<k ){\n\t\t\t\tcount=count-k;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint count =0;\n\t\t\n\t\t\n\t\t\tif(A<=k && 0<k){\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\telse if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && 0<k){\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && B==0 && 0<k ){\n\t\t\t\tcount=count-k;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int C = sc.nextInt();",
"C",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count =0;",
"count",
"0",
"if(A<=k && 0<k){\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\telse if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}",
"A<=k && 0<k",
"A<=k",
"A",
"k",
"0<k",
"0",
"k",
"{\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}",
"count += A",
"count",
"A",
"k=k-A",
"k",
"k-A",
"k",
"A",
"A=0",
"A",
"0",
"if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}",
"A>k",
"A",
"k",
"{\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}",
"count +=k",
"count",
"k",
"A=0",
"A",
"0",
"if(A==0 && 0<k){\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}",
"A==0 && 0<k",
"A==0",
"A",
"0",
"0<k",
"0",
"k",
"{\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}",
"k=k-B",
"k",
"k-B",
"k",
"B",
"B=0",
"B",
"0",
"if(A==0 && B==0 && 0<k ){\n\t\t\t\tcount=count-k;\n\t\t\t}",
"A==0 && B==0 && 0<k",
"A==0 && B==0 && 0<k",
"A==0",
"A",
"0",
"B==0",
"B",
"0",
"0<k",
"0",
"k",
"{\n\t\t\t\tcount=count-k;\n\t\t\t}",
"count=count-k",
"count",
"count-k",
"count",
"k",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"String args[]",
"args",
"public class Main{\n\tpublic static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint count =0;\n\t\t\n\t\t\n\t\t\tif(A<=k && 0<k){\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\telse if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && 0<k){\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && B==0 && 0<k ){\n\t\t\t\tcount=count-k;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\n\t}\n}",
"public class Main{\n\tpublic static void main(String args[]){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\t\n\t\tint k = sc.nextInt();\n\t\tint count =0;\n\t\t\n\t\t\n\t\t\tif(A<=k && 0<k){\n\t\t\tcount += A;\n\t\t\tk=k-A;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\telse if(A>k){\n\t\t\tcount +=k;\n\t\t\tA=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && 0<k){\n\t\t\t\tk=k-B;\n\t\t\t\tB=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(A==0 && B==0 && 0<k ){\n\t\t\t\tcount=count-k;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int k = sc.nextInt();
int count =0;
if(A<=k && 0<k){
count += A;
k=k-A;
A=0;
}
else if(A>k){
count +=k;
A=0;
}
if(A==0 && 0<k){
k=k-B;
B=0;
}
if(A==0 && B==0 && 0<k ){
count=count-k;
}
System.out.println(count);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
2,
17,
17,
41,
13,
17,
41,
13,
20,
17,
41,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
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,
41,
13,
17,
42,
2,
40,
13,
17,
30,
4,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
13,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
13,
13,
2,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
4,
18,
13,
13,
4,
18,
13,
17,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
20,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
40,
18,
13,
13,
30,
11,
1,
41,
13,
2,
17,
13,
2,
13,
17,
1,
0,
13,
13,
30,
0,
18,
13,
13,
17,
12,
13,
30,
14,
2,
13,
17,
29,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
41,
13,
4,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
13,
30,
14,
2,
13,
17,
0,
13,
13,
14,
2,
13,
17,
0,
13,
13,
0,
13,
17,
30,
14,
2,
13,
17,
0,
13,
18,
13,
13,
14,
2,
13,
17,
0,
13,
18,
13,
13,
0,
13,
18,
13,
13,
4,
18,
13,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
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
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
13,
18
],
[
18,
19
],
[
18,
20
],
[
13,
21
],
[
21,
22
],
[
13,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
13,
28
],
[
28,
29
],
[
28,
30
],
[
13,
31
],
[
31,
32
],
[
31,
33
],
[
13,
35
],
[
35,
36
],
[
35,
37
],
[
13,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
41,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
40,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
13,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
13,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
13,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
89,
94
],
[
94,
95
],
[
95,
96
],
[
85,
97
],
[
97,
98
],
[
98,
99
],
[
83,
100
],
[
100,
101
],
[
13,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
106,
114
],
[
102,
115
],
[
115,
116
],
[
102,
117
],
[
117,
118
],
[
13,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
119,
128
],
[
128,
129
],
[
119,
130
],
[
130,
131
],
[
13,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
142,
144
],
[
137,
145
],
[
136,
146
],
[
132,
147
],
[
147,
148
],
[
132,
149
],
[
149,
150
],
[
13,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
155,
160
],
[
160,
161
],
[
161,
162
],
[
160,
163
],
[
151,
164
],
[
164,
165
],
[
13,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
177,
183
],
[
183,
184
],
[
183,
185
],
[
176,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
188,
190
],
[
176,
191
],
[
191,
192
],
[
191,
193
],
[
168,
194
],
[
194,
195
],
[
166,
196
],
[
196,
197
],
[
166,
198
],
[
198,
199
],
[
13,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
202,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
210,
213
],
[
202,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
215,
218
],
[
200,
219
],
[
219,
220
],
[
13,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
224,
228
],
[
223,
229
],
[
229,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
229,
234
],
[
234,
235
],
[
234,
236
],
[
229,
237
],
[
237,
238
],
[
238,
239
],
[
229,
240
],
[
241,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
242,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
252,
254
],
[
248,
255
],
[
255,
256
],
[
255,
257
],
[
248,
258
],
[
258,
259
],
[
259,
260
],
[
259,
261
],
[
248,
262
],
[
262,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
263,
267
],
[
13,
268
],
[
268,
269
],
[
268,
270
],
[
270,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
271,
275
],
[
275,
276
],
[
270,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
277,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
286
],
[
277,
287
],
[
287,
288
],
[
288,
289
],
[
277,
290
],
[
291,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
292,
298
],
[
298,
299
],
[
270,
300
],
[
300,
301
],
[
268,
302
],
[
302,
303
],
[
13,
304
],
[
304,
305
],
[
304,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
306,
313
],
[
313,
314
],
[
314,
315
],
[
314,
316
],
[
314,
317
],
[
317,
318
],
[
317,
319
],
[
304,
320
],
[
320,
321
],
[
304,
322
],
[
322,
323
],
[
13,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
326,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
331,
336
],
[
336,
337
],
[
336,
338
],
[
331,
339
],
[
339,
340
],
[
340,
341
],
[
331,
342
],
[
342,
343
],
[
343,
344
],
[
344,
345
],
[
344,
346
],
[
343,
347
],
[
347,
348
],
[
326,
349
],
[
349,
350
],
[
349,
351
],
[
351,
352
],
[
326,
353
],
[
353,
354
],
[
353,
355
],
[
326,
356
],
[
356,
357
],
[
357,
358
],
[
358,
359
],
[
358,
360
],
[
356,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
361,
365
],
[
365,
366
],
[
365,
367
],
[
356,
368
],
[
368,
369
],
[
369,
370
],
[
356,
371
],
[
372,
372
],
[
372,
373
],
[
373,
374
],
[
374,
375
],
[
375,
376
],
[
375,
377
],
[
374,
378
],
[
373,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
381,
383
],
[
380,
384
],
[
384,
385
],
[
384,
386
],
[
380,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
387,
391
],
[
391,
392
],
[
391,
393
],
[
379,
394
],
[
394,
395
],
[
394,
396
],
[
373,
397
],
[
397,
398
],
[
398,
399
],
[
399,
400
],
[
399,
401
],
[
398,
402
],
[
402,
403
],
[
402,
404
],
[
404,
405
],
[
404,
406
],
[
398,
407
],
[
407,
408
],
[
408,
409
],
[
408,
410
],
[
407,
411
],
[
411,
412
],
[
411,
413
],
[
413,
414
],
[
413,
415
],
[
397,
416
],
[
416,
417
],
[
416,
418
],
[
418,
419
],
[
418,
420
],
[
326,
421
],
[
421,
422
],
[
422,
423
],
[
421,
424
],
[
13,
425
],
[
425,
426
],
[
425,
427
],
[
427,
428
],
[
425,
429
],
[
429,
430
],
[
425,
431
],
[
431,
432
],
[
431,
433
],
[
433,
434
],
[
434,
435
],
[
434,
436
],
[
433,
437
],
[
437,
438
],
[
437,
439
],
[
431,
440
],
[
440,
441
],
[
431,
442
],
[
442,
443
]
] |
[
"import java.math.BigInteger;\nimport java.util.*;\nimport java.io.*;\nimport java.text.*;\n\nclass Main {\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 32768);\n static PrintWriter out = new PrintWriter(System.out);\n static StringTokenizer t;\n\n static String sn() {\n while (t == null || !t.hasMoreTokens()) {\n try {\n t = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }\n return t.nextToken();\n }\n\n static int ni() {\n return Integer.parseInt(sn());\n }\n\n static long nlo() {\n return Long.parseLong(sn());\n }\n\n public static void main(String args[]) {\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n out.close();\n }\n\n static long mod = (long) 1e9 + 7;\n\n static long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n static long add(long a, long b) {\n return (a + b) % mod;\n }\n\n static long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n static int maxn = 1000005;\n\n static int pow(int n) {\n return (int) (Math.log10(n) / Math.log10(2));\n }\n\n static long modpow(long x, long y) {\n long res = 1l;\n// x %= mod;\n while (y > 0) {\n if (y % 2 != 0)\n res *= x;\n x = x * x;\n y /= 2;\n }\n return res;\n }\n\n static class pair {\n String a;\n int b;\n\n pair(String x, int y) {\n a = x;\n b = y;\n }\n }\n\n static long modInverse(long n) {\n BigInteger n1 = new BigInteger(Long.toString(n));\n String s = (n1.modInverse(new BigInteger(Long.toString(mod)))).toString();\n return Long.parseLong(s);\n }\n\n static boolean v[] = new boolean[1000005];\n\n static void seive() {\n v[1] = true;\n for (int i = 2; i < 1000005; i++) {\n if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }\n }\n }\n\n static boolean isprime(long n) {\n if (n == 1)\n return false;\n for (int i = 2; i * i <= n; i++) {\n if (n % i == 0)\n return false;\n }\n return true;\n }\n\n static int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n static DecimalFormat df = new DecimalFormat(\"0.000000000000000000000\");\n\n static void solve() {\n long arr[] = new long[3];\n for (int i = 0; i < 3; i++)\n arr[i] = nlo();\n long k = nlo();\n long sum = 0;\n for (int i = 0; i < 3 && k > 0; i++) {\n if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }\n }\n out.println(sum);\n }\n}\n",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.text.*;",
"text.*",
"java",
"class Main {\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 32768);\n static PrintWriter out = new PrintWriter(System.out);\n static StringTokenizer t;\n\n static String sn() {\n while (t == null || !t.hasMoreTokens()) {\n try {\n t = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }\n return t.nextToken();\n }\n\n static int ni() {\n return Integer.parseInt(sn());\n }\n\n static long nlo() {\n return Long.parseLong(sn());\n }\n\n public static void main(String args[]) {\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n out.close();\n }\n\n static long mod = (long) 1e9 + 7;\n\n static long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }\n\n static long add(long a, long b) {\n return (a + b) % mod;\n }\n\n static long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }\n\n static int maxn = 1000005;\n\n static int pow(int n) {\n return (int) (Math.log10(n) / Math.log10(2));\n }\n\n static long modpow(long x, long y) {\n long res = 1l;\n// x %= mod;\n while (y > 0) {\n if (y % 2 != 0)\n res *= x;\n x = x * x;\n y /= 2;\n }\n return res;\n }\n\n static class pair {\n String a;\n int b;\n\n pair(String x, int y) {\n a = x;\n b = y;\n }\n }\n\n static long modInverse(long n) {\n BigInteger n1 = new BigInteger(Long.toString(n));\n String s = (n1.modInverse(new BigInteger(Long.toString(mod)))).toString();\n return Long.parseLong(s);\n }\n\n static boolean v[] = new boolean[1000005];\n\n static void seive() {\n v[1] = true;\n for (int i = 2; i < 1000005; i++) {\n if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }\n }\n }\n\n static boolean isprime(long n) {\n if (n == 1)\n return false;\n for (int i = 2; i * i <= n; i++) {\n if (n % i == 0)\n return false;\n }\n return true;\n }\n\n static int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }\n\n static DecimalFormat df = new DecimalFormat(\"0.000000000000000000000\");\n\n static void solve() {\n long arr[] = new long[3];\n for (int i = 0; i < 3; i++)\n arr[i] = nlo();\n long k = nlo();\n long sum = 0;\n for (int i = 0; i < 3 && k > 0; i++) {\n if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }\n }\n out.println(sum);\n }\n}",
"Main",
"static BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 32768);",
"br",
"new BufferedReader(new InputStreamReader(System.in), 32768)",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static StringTokenizer t;",
"t",
"static long mod = (long) 1e9 + 7;",
"mod",
"(long) 1e9 + 7",
"(long) 1e9",
"7",
"static int maxn = 1000005;",
"maxn",
"1000005",
"static boolean v[] = new boolean[1000005];",
"v",
"new boolean[1000005]",
"1000005",
"static DecimalFormat df = new DecimalFormat(\"0.000000000000000000000\");",
"df",
"new DecimalFormat(\"0.000000000000000000000\")",
"static String sn() {\n while (t == null || !t.hasMoreTokens()) {\n try {\n t = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }\n return t.nextToken();\n }",
"sn",
"{\n while (t == null || !t.hasMoreTokens()) {\n try {\n t = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }\n return t.nextToken();\n }",
"while (t == null || !t.hasMoreTokens()) {\n try {\n t = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }",
"t == null || !t.hasMoreTokens()",
"t == null",
"t",
"null",
"!t.hasMoreTokens()",
"t.hasMoreTokens()",
"t.hasMoreTokens",
"t",
"{\n try {\n t = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }",
"try {\n t = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException();\n }",
"catch (IOException e) {\n throw new RuntimeException();\n }",
"IOException e",
"{\n throw new RuntimeException();\n }",
"throw new RuntimeException();",
"new RuntimeException()",
"{\n t = new StringTokenizer(br.readLine());\n }",
"t = new StringTokenizer(br.readLine())",
"t",
"new StringTokenizer(br.readLine())",
"return t.nextToken();",
"t.nextToken()",
"t.nextToken",
"t",
"static int ni() {\n return Integer.parseInt(sn());\n }",
"ni",
"{\n return Integer.parseInt(sn());\n }",
"return Integer.parseInt(sn());",
"Integer.parseInt(sn())",
"Integer.parseInt",
"Integer",
"sn()",
"sn",
"static long nlo() {\n return Long.parseLong(sn());\n }",
"nlo",
"{\n return Long.parseLong(sn());\n }",
"return Long.parseLong(sn());",
"Long.parseLong(sn())",
"Long.parseLong",
"Long",
"sn()",
"sn",
"public static void main(String args[]) {\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n out.close();\n }",
"main",
"{\n int t = 1;\n while (t-- > 0) {\n solve();\n }\n out.close();\n }",
"int t = 1;",
"t",
"1",
"while (t-- > 0) {\n solve();\n }",
"t-- > 0",
"t--",
"t",
"0",
"{\n solve();\n }",
"solve()",
"solve",
"out.close()",
"out.close",
"out",
"String args[]",
"args",
"static long pro(long a, long b) {\n return (a % mod * b % mod) % mod;\n }",
"pro",
"{\n return (a % mod * b % mod) % mod;\n }",
"return (a % mod * b % mod) % mod;",
"(a % mod * b % mod) % mod",
"(a % mod * b % mod)",
"a % mod * b",
"a % mod",
"a",
"mod",
"b",
"mod",
"mod",
"long a",
"a",
"long b",
"b",
"static long add(long a, long b) {\n return (a + b) % mod;\n }",
"add",
"{\n return (a + b) % mod;\n }",
"return (a + b) % mod;",
"(a + b) % mod",
"(a + b)",
"a",
"b",
"mod",
"long a",
"a",
"long b",
"b",
"static long sub(long a, long b) {\n return ((a % mod - b % mod) + mod) % mod;\n }",
"sub",
"{\n return ((a % mod - b % mod) + mod) % mod;\n }",
"return ((a % mod - b % mod) + mod) % mod;",
"((a % mod - b % mod) + mod) % mod",
"((a % mod - b % mod) + mod)",
"(a % mod - b % mod)",
"a % mod",
"a",
"mod",
"b % mod",
"b",
"mod",
"mod",
"mod",
"long a",
"a",
"long b",
"b",
"static int pow(int n) {\n return (int) (Math.log10(n) / Math.log10(2));\n }",
"pow",
"{\n return (int) (Math.log10(n) / Math.log10(2));\n }",
"return (int) (Math.log10(n) / Math.log10(2));",
"(int) (Math.log10(n) / Math.log10(2))",
"Math.log10(n)",
"Math.log10",
"Math",
"n",
"Math.log10(2)",
"Math.log10",
"Math",
"2",
"int n",
"n",
"static long modpow(long x, long y) {\n long res = 1l;\n// x %= mod;\n while (y > 0) {\n if (y % 2 != 0)\n res *= x;\n x = x * x;\n y /= 2;\n }\n return res;\n }",
"modpow",
"{\n long res = 1l;\n// x %= mod;\n while (y > 0) {\n if (y % 2 != 0)\n res *= x;\n x = x * x;\n y /= 2;\n }\n return res;\n }",
"long res = 1l;",
"res",
"1l",
"while (y > 0) {\n if (y % 2 != 0)\n res *= x;\n x = x * x;\n y /= 2;\n }",
"y > 0",
"y",
"0",
"{\n if (y % 2 != 0)\n res *= x;\n x = x * x;\n y /= 2;\n }",
"if (y % 2 != 0)\n res *= x;",
"y % 2 != 0",
"y % 2",
"y",
"2",
"0",
"res *= x",
"res",
"x",
"x = x * x",
"x",
"x * x",
"x",
"x",
"y /= 2",
"y",
"2",
"return res;",
"res",
"long x",
"x",
"long y",
"y",
"static long modInverse(long n) {\n BigInteger n1 = new BigInteger(Long.toString(n));\n String s = (n1.modInverse(new BigInteger(Long.toString(mod)))).toString();\n return Long.parseLong(s);\n }",
"modInverse",
"{\n BigInteger n1 = new BigInteger(Long.toString(n));\n String s = (n1.modInverse(new BigInteger(Long.toString(mod)))).toString();\n return Long.parseLong(s);\n }",
"BigInteger n1 = new BigInteger(Long.toString(n));",
"n1",
"new BigInteger(Long.toString(n))",
"String s = (n1.modInverse(new BigInteger(Long.toString(mod)))).toString();",
"s",
"(n1.modInverse(new BigInteger(Long.toString(mod)))).toString()",
"(n1.modInverse(new BigInteger(Long.toString(mod)))).toString",
"(n1.modInverse(new BigInteger(Long.toString(mod))))",
"n1.modInverse",
"n1",
"new BigInteger(Long.toString(mod))",
"return Long.parseLong(s);",
"Long.parseLong(s)",
"Long.parseLong",
"Long",
"s",
"long n",
"n",
"static void seive() {\n v[1] = true;\n for (int i = 2; i < 1000005; i++) {\n if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }\n }\n }",
"seive",
"{\n v[1] = true;\n for (int i = 2; i < 1000005; i++) {\n if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }\n }\n }",
"v[1] = true",
"v[1]",
"v",
"1",
"true",
"for (int i = 2; i < 1000005; i++) {\n if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < 1000005",
"i",
"1000005",
"i++",
"i++",
"i",
"{\n if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }\n }",
"{\n if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }\n }",
"if (!v[i]) {\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }",
"!v[i]",
"v[i]",
"v",
"i",
"{\n for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;\n }",
"for (int j = 2 * i; j < 1000005; j += i)\n v[j] = true;",
"int j = 2 * i;",
"int j = 2 * i;",
"j",
"2 * i",
"2",
"i",
"j < 1000005",
"j",
"1000005",
"j += i",
"j += i",
"j",
"i",
"v[j] = true;",
"v[j] = true",
"v[j]",
"v",
"j",
"true",
"static boolean isprime(long n) {\n if (n == 1)\n return false;\n for (int i = 2; i * i <= n; i++) {\n if (n % i == 0)\n return false;\n }\n return true;\n }",
"isprime",
"{\n if (n == 1)\n return false;\n for (int i = 2; i * i <= n; i++) {\n if (n % i == 0)\n return false;\n }\n return true;\n }",
"if (n == 1)\n return false;",
"n == 1",
"n",
"1",
"return false;",
"false",
"for (int i = 2; i * i <= n; i++) {\n if (n % i == 0)\n return false;\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (n % i == 0)\n return false;\n }",
"{\n if (n % i == 0)\n return false;\n }",
"if (n % i == 0)\n return false;",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"long n",
"n",
"static int gcd(int a, int b) {\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }",
"gcd",
"{\n if (b == 0)\n return a;\n return gcd(b, a % b);\n }",
"if (b == 0)\n return a;",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static void solve() {\n long arr[] = new long[3];\n for (int i = 0; i < 3; i++)\n arr[i] = nlo();\n long k = nlo();\n long sum = 0;\n for (int i = 0; i < 3 && k > 0; i++) {\n if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }\n }\n out.println(sum);\n }",
"solve",
"{\n long arr[] = new long[3];\n for (int i = 0; i < 3; i++)\n arr[i] = nlo();\n long k = nlo();\n long sum = 0;\n for (int i = 0; i < 3 && k > 0; i++) {\n if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }\n }\n out.println(sum);\n }",
"long arr[] = new long[3];",
"arr",
"new long[3]",
"3",
"for (int i = 0; i < 3; i++)\n arr[i] = nlo();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 3",
"i",
"3",
"i++",
"i++",
"i",
"arr[i] = nlo();",
"arr[i] = nlo()",
"arr[i]",
"arr",
"i",
"nlo()",
"nlo",
"long k = nlo();",
"k",
"nlo()",
"nlo",
"long sum = 0;",
"sum",
"0",
"for (int i = 0; i < 3 && k > 0; i++) {\n if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 3 && k > 0",
"i < 3",
"i",
"3",
"k > 0",
"k",
"0",
"i++",
"i++",
"i",
"{\n if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }\n }",
"{\n if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }\n }",
"if (arr[i] >= k) {\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n } else {\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }",
"arr[i] >= k",
"arr[i]",
"arr",
"i",
"k",
"{\n if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;\n k = 0;\n }",
"if (i == 0)\n sum += k;\n else if (i == 2)\n sum -= k;",
"i == 0",
"i",
"0",
"sum += k",
"sum",
"k",
"if (i == 2)\n sum -= k;",
"i == 2",
"i",
"2",
"sum -= k",
"sum",
"k",
"k = 0",
"k",
"0",
"{\n if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];\n k -= arr[i];\n }",
"if (i == 0)\n sum += arr[i];\n else if (i == 2)\n sum -= arr[i];",
"i == 0",
"i",
"0",
"sum += arr[i]",
"sum",
"arr[i]",
"arr",
"i",
"if (i == 2)\n sum -= arr[i];",
"i == 2",
"i",
"2",
"sum -= arr[i]",
"sum",
"arr[i]",
"arr",
"i",
"k -= arr[i]",
"k",
"arr[i]",
"arr",
"i",
"out.println(sum)",
"out.println",
"out",
"sum",
"static class pair {\n String a;\n int b;\n\n pair(String x, int y) {\n a = x;\n b = y;\n }\n }",
"pair",
"String a;",
"a",
"int b;",
"b",
"pair(String x, int y) {\n a = x;\n b = y;\n }",
"pair",
"{\n a = x;\n b = y;\n }",
"a = x",
"a",
"x",
"b = y",
"b",
"y",
"String x",
"x",
"int y",
"y"
] |
import java.math.BigInteger;
import java.util.*;
import java.io.*;
import java.text.*;
class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in), 32768);
static PrintWriter out = new PrintWriter(System.out);
static StringTokenizer t;
static String sn() {
while (t == null || !t.hasMoreTokens()) {
try {
t = new StringTokenizer(br.readLine());
} catch (IOException e) {
throw new RuntimeException();
}
}
return t.nextToken();
}
static int ni() {
return Integer.parseInt(sn());
}
static long nlo() {
return Long.parseLong(sn());
}
public static void main(String args[]) {
int t = 1;
while (t-- > 0) {
solve();
}
out.close();
}
static long mod = (long) 1e9 + 7;
static long pro(long a, long b) {
return (a % mod * b % mod) % mod;
}
static long add(long a, long b) {
return (a + b) % mod;
}
static long sub(long a, long b) {
return ((a % mod - b % mod) + mod) % mod;
}
static int maxn = 1000005;
static int pow(int n) {
return (int) (Math.log10(n) / Math.log10(2));
}
static long modpow(long x, long y) {
long res = 1l;
// x %= mod;
while (y > 0) {
if (y % 2 != 0)
res *= x;
x = x * x;
y /= 2;
}
return res;
}
static class pair {
String a;
int b;
pair(String x, int y) {
a = x;
b = y;
}
}
static long modInverse(long n) {
BigInteger n1 = new BigInteger(Long.toString(n));
String s = (n1.modInverse(new BigInteger(Long.toString(mod)))).toString();
return Long.parseLong(s);
}
static boolean v[] = new boolean[1000005];
static void seive() {
v[1] = true;
for (int i = 2; i < 1000005; i++) {
if (!v[i]) {
for (int j = 2 * i; j < 1000005; j += i)
v[j] = true;
}
}
}
static boolean isprime(long n) {
if (n == 1)
return false;
for (int i = 2; i * i <= n; i++) {
if (n % i == 0)
return false;
}
return true;
}
static int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
static DecimalFormat df = new DecimalFormat("0.000000000000000000000");
static void solve() {
long arr[] = new long[3];
for (int i = 0; i < 3; i++)
arr[i] = nlo();
long k = nlo();
long sum = 0;
for (int i = 0; i < 3 && k > 0; i++) {
if (arr[i] >= k) {
if (i == 0)
sum += k;
else if (i == 2)
sum -= k;
k = 0;
} else {
if (i == 0)
sum += arr[i];
else if (i == 2)
sum -= arr[i];
k -= arr[i];
}
}
out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
2,
13,
13,
13,
2,
2,
2,
13,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
2,
17,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
90,
5
],
[
90,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
43,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
61,
67
],
[
67,
68
],
[
69,
69
],
[
69,
70
],
[
69,
71
],
[
69,
72
],
[
67,
73
],
[
60,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
6,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
"import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(a >= k){\n System.out.println(k);\n }else if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\n }\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 a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(a >= k){\n System.out.println(k);\n }else if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(a >= k){\n System.out.println(k);\n }else if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(a >= k){\n System.out.println(k);\n }else if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\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 = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a >= k){\n System.out.println(k);\n }else if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\n }",
"a >= k",
"a",
"k",
"{\n System.out.println(k);\n }",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\n }",
"a < k && a + b >= k",
"a < k",
"a",
"k",
"a + b >= k",
"a + b",
"a",
"b",
"k",
"{\n System.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\n }",
"a + b < k && a + b+ c >= k",
"a + b < k",
"a + b",
"a",
"b",
"k",
"a + b+ c >= k",
"a + b+ c",
"a + b+ c",
"a",
"b",
"c",
"k",
"{\n System.out.println(2 * a + b - k);\n }",
"System.out.println(2 * a + b - k)",
"System.out.println",
"System.out",
"System",
"System.out",
"2 * a + b - k",
"2 * a + b",
"2 * a",
"2",
"a",
"b",
"k",
"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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(a >= k){\n System.out.println(k);\n }else if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\n }\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n if(a >= k){\n System.out.println(k);\n }else if(a < k && a + b >= k) {\n System.out.println(a);\n }else if(a + b < k && a + b+ c >= k) {\n System.out.println(2 * a + b - k);\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();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
if(a >= k){
System.out.println(k);
}else if(a < k && a + b >= k) {
System.out.println(a);
}else if(a + b < k && a + b+ c >= k) {
System.out.println(2 * a + b - k);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
13,
2,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
40,
17,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
43,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
] |
[
"import java.util.Scanner;\n\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\t\tint b=scan.nextInt();\n\t\tint c=scan.nextInt();\n\t\tint k=scan.nextInt();\n\t\tif(k<=a) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\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\tScanner scan=new Scanner(System.in);\n\t\tint a=scan.nextInt();\n\t\tint b=scan.nextInt();\n\t\tint c=scan.nextInt();\n\t\tint k=scan.nextInt();\n\t\tif(k<=a) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}\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\t\tint b=scan.nextInt();\n\t\tint c=scan.nextInt();\n\t\tint k=scan.nextInt();\n\t\tif(k<=a) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint a=scan.nextInt();\n\t\tint b=scan.nextInt();\n\t\tint c=scan.nextInt();\n\t\tint k=scan.nextInt();\n\t\tif(k<=a) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}\n\t}",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int a=scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b=scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int c=scan.nextInt();",
"c",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k=scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(k<=a) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}",
"k<=a",
"k",
"a",
"{\n\t\t\tSystem.out.println(k);\n\t\t}",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}",
"k<=a+b",
"k",
"a+b",
"a",
"b",
"{\n\t\t\tSystem.out.println((a*1));\n\t\t}",
"System.out.println((a*1))",
"System.out.println",
"System.out",
"System",
"System.out",
"(a*1)",
"a",
"1",
"{\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}",
"System.out.println((a*1)+(-1*(k-a-b)))",
"System.out.println",
"System.out",
"System",
"System.out",
"(a*1)+(-1*(k-a-b))",
"(a*1)",
"a",
"1",
"(-1*(k-a-b))",
"-1",
"1",
"(k-a-b)",
"k-a-b",
"k",
"a",
"b",
"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\t\tint b=scan.nextInt();\n\t\tint c=scan.nextInt();\n\t\tint k=scan.nextInt();\n\t\tif(k<=a) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}\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\t\tint b=scan.nextInt();\n\t\tint c=scan.nextInt();\n\t\tint k=scan.nextInt();\n\t\tif(k<=a) {\n\t\t\tSystem.out.println(k);\n\t\t}\n\t\telse if(k<=a+b) {\n\t\t\tSystem.out.println((a*1));\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println((a*1)+(-1*(k-a-b)));\n\t\t}\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 b=scan.nextInt();
int c=scan.nextInt();
int k=scan.nextInt();
if(k<=a) {
System.out.println(k);
}
else if(k<=a+b) {
System.out.println((a*1));
}
else {
System.out.println((a*1)+(-1*(k-a-b)));
}
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
2,
13,
2,
2,
13,
2,
13,
13,
40,
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
],
[
87,
11
],
[
87,
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
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
14,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
49,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
70,
76
],
[
76,
77
],
[
14,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
12,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
] |
[
"import 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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n if (k<=a){\n ans = k;\n }\n else if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }\n System.out.println(ans);\n }\n}",
"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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n if (k<=a){\n ans = k;\n }\n else if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n if (k<=a){\n ans = k;\n }\n else if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n if (k<=a){\n ans = k;\n }\n else if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"long ans = 0;",
"ans",
"0",
"if (k<=a){\n ans = k;\n }\n else if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }",
"k<=a",
"k",
"a",
"{\n ans = k;\n }",
"ans = k",
"ans",
"k",
"if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }",
"k<=(a+b)",
"k",
"(a+b)",
"a",
"b",
"{\n ans = a;\n }",
"ans = a",
"ans",
"a",
"if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }",
"k>(a+b)",
"k",
"(a+b)",
"a",
"b",
"{\n ans = a + ((k-(a+b))*-1);\n }",
"ans = a + ((k-(a+b))*-1)",
"ans",
"a + ((k-(a+b))*-1)",
"a",
"((k-(a+b))*-1)",
"(k-(a+b))",
"k",
"(a+b)",
"a",
"b",
"-1",
"1",
"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\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n if (k<=a){\n ans = k;\n }\n else if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\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\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n if (k<=a){\n ans = k;\n }\n else if(k<=(a+b)){\n ans = a;\n }\n else if (k>(a+b)){\n ans = a + ((k-(a+b))*-1);\n }\n System.out.println(ans);\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 a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
long ans = 0;
if (k<=a){
ans = k;
}
else if(k<=(a+b)){
ans = a;
}
else if (k>(a+b)){
ans = a + ((k-(a+b))*-1);
}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
2,
17,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
40,
13,
40,
13,
14,
2,
13,
17,
30,
40,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
73,
5
],
[
73,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
41,
42
],
[
35,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
45,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
54,
61
],
[
61,
62
],
[
62,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
6,
70
],
[
70,
71
],
[
0,
72
],
[
72,
73
],
[
72,
74
]
] |
[
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor(;0<k;k--) {\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor(;0<k;k--) {\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor(;0<k;k--) {\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor(;0<k;k--) {\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int c = scan.nextInt();",
"c",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int ans = 0;",
"ans",
"0",
"for(;0<k;k--) {\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}",
";",
"0<k",
"0",
"k",
"k--",
"k--",
"k",
"{\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}",
"if(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}",
"a>0",
"a",
"0",
"{\n\t\t\t\ta--;ans++;\n\t\t\t}",
"a--",
"a",
"ans++",
"ans",
"if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}",
"b>0",
"b",
"0",
"{\n\t\t\t\tb--;\n\t\t\t}",
"b--",
"b",
"{\n\t\t\t\tans--;\n\t\t\t}",
"ans--",
"ans",
"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\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor(;0<k;k--) {\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint ans = 0;\n\t\tfor(;0<k;k--) {\n\t\t\tif(a>0) {\n\t\t\t\ta--;ans++;\n\t\t\t}else if(b>0) {\n\t\t\t\tb--;\n\t\t\t}else {\n\t\t\t\tans--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\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 b = scan.nextInt();
int c = scan.nextInt();
int k = scan.nextInt();
int ans = 0;
for(;0<k;k--) {
if(a>0) {
a--;ans++;
}else if(b>0) {
b--;
}else {
ans--;
}
}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
0,
13,
4,
18,
13,
13,
13,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
13,
29,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
13,
29,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
94,
5
],
[
94,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
51,
58
],
[
8,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
68,
75
],
[
8,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
6,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n ans = Math.min(a, k);\n k = k - a;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = k - b;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = Math.min(c, k);\n System.out.println(ans - k);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n ans = Math.min(a, k);\n k = k - a;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = k - b;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = Math.min(c, k);\n System.out.println(ans - k);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n ans = Math.min(a, k);\n k = k - a;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = k - b;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = Math.min(c, k);\n System.out.println(ans - k);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n ans = Math.min(a, k);\n k = k - a;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = k - b;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = Math.min(c, k);\n System.out.println(ans - k);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"long ans = 0;",
"ans",
"0",
"ans = Math.min(a, k)",
"ans",
"Math.min(a, k)",
"Math.min",
"Math",
"a",
"k",
"k = k - a",
"k",
"k - a",
"k",
"a",
"if(k <= 0) {\n System.out.println(ans);\n return;\n }",
"k <= 0",
"k",
"0",
"{\n System.out.println(ans);\n return;\n }",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return;",
"k = k - b",
"k",
"k - b",
"k",
"b",
"if(k <= 0) {\n System.out.println(ans);\n return;\n }",
"k <= 0",
"k",
"0",
"{\n System.out.println(ans);\n return;\n }",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return;",
"k = Math.min(c, k)",
"k",
"Math.min(c, k)",
"Math.min",
"Math",
"c",
"k",
"System.out.println(ans - k)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans - k",
"ans",
"k",
"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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n ans = Math.min(a, k);\n k = k - a;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = k - b;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = Math.min(c, k);\n System.out.println(ans - k);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n long ans = 0;\n ans = Math.min(a, k);\n k = k - a;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = k - b;\n if(k <= 0) {\n System.out.println(ans);\n return;\n }\n k = Math.min(c, k);\n System.out.println(ans - k);\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();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
long ans = 0;
ans = Math.min(a, k);
k = k - a;
if(k <= 0) {
System.out.println(ans);
return;
}
k = k - b;
if(k <= 0) {
System.out.println(ans);
return;
}
k = Math.min(c, k);
System.out.println(ans - k);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
56,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
6,
69
],
[
69,
70
],
[
0,
71
],
[
71,
72
],
[
71,
73
]
] |
[
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n long ans = 0;\n\n if(k < a){\n ans = k;\n } else if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }\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\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n long ans = 0;\n\n if(k < a){\n ans = k;\n } else if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }\n\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n long ans = 0;\n\n if(k < a){\n ans = k;\n } else if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }\n\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n long ans = 0;\n\n if(k < a){\n ans = k;\n } else if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }\n\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long a = sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b = sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long c = sc.nextLong();",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long k = sc.nextLong();",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long ans = 0;",
"ans",
"0",
"if(k < a){\n ans = k;\n } else if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }",
"k < a",
"k",
"a",
"{\n ans = k;\n }",
"ans = k",
"ans",
"k",
"if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }",
"k <= a + b",
"k",
"a + b",
"a",
"b",
"{\n ans = a;\n }",
"ans = a",
"ans",
"a",
"{\n ans = 2 * a + b - k;\n }",
"ans = 2 * a + b - k",
"ans",
"2 * a + b - k",
"2 * a + b",
"2 * a",
"2",
"a",
"b",
"k",
"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\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n long ans = 0;\n\n if(k < a){\n ans = k;\n } else if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }\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\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = sc.nextLong();\n long k = sc.nextLong();\n long ans = 0;\n\n if(k < a){\n ans = k;\n } else if(k <= a + b){\n ans = a;\n } else {\n ans = 2 * a + b - k;\n }\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);
long a = sc.nextLong();
long b = sc.nextLong();
long c = sc.nextLong();
long k = sc.nextLong();
long ans = 0;
if(k < a){
ans = k;
} else if(k <= a + b){
ans = a;
} else {
ans = 2 * a + b - k;
}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
13,
17,
30,
3,
40,
13,
14,
2,
13,
13,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
13,
30,
30,
3,
40,
13,
14,
2,
2,
13,
13,
13,
4,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
13,
40,
17,
4,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
4,
18,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
153,
5
],
[
153,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
53,
64
],
[
64,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
73,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
88,
93
],
[
93,
94
],
[
87,
95
],
[
95,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
8,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
106,
118
],
[
118,
119
],
[
119,
120
],
[
106,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
8,
132
],
[
132,
133
],
[
132,
134
],
[
6,
135
],
[
135,
136
],
[
153,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
139,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
137,
150
],
[
150,
151
],
[
0,
152
],
[
152,
153
],
[
152,
154
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int numa = 0;\n int numb = 0;\n for(int i=0; i<k; i++) {\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }\n if(numa == k) printAns(ans);\n\n for(int j=0; j<k-numa; j++) {\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }\n if(numa+numb == k) printAns(ans);\n\n for(int l=0; l<k-(numa+numb); l++) {\n if(l < c) {\n ans += -1;\n }\n }\n printAns(ans);\n }\n\n public static void printAns(int ans) {\n System.out.println(ans);\n System.exit(0);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int numa = 0;\n int numb = 0;\n for(int i=0; i<k; i++) {\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }\n if(numa == k) printAns(ans);\n\n for(int j=0; j<k-numa; j++) {\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }\n if(numa+numb == k) printAns(ans);\n\n for(int l=0; l<k-(numa+numb); l++) {\n if(l < c) {\n ans += -1;\n }\n }\n printAns(ans);\n }\n\n public static void printAns(int ans) {\n System.out.println(ans);\n System.exit(0);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int numa = 0;\n int numb = 0;\n for(int i=0; i<k; i++) {\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }\n if(numa == k) printAns(ans);\n\n for(int j=0; j<k-numa; j++) {\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }\n if(numa+numb == k) printAns(ans);\n\n for(int l=0; l<k-(numa+numb); l++) {\n if(l < c) {\n ans += -1;\n }\n }\n printAns(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int numa = 0;\n int numb = 0;\n for(int i=0; i<k; i++) {\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }\n if(numa == k) printAns(ans);\n\n for(int j=0; j<k-numa; j++) {\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }\n if(numa+numb == k) printAns(ans);\n\n for(int l=0; l<k-(numa+numb); l++) {\n if(l < c) {\n ans += -1;\n }\n }\n printAns(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"int numa = 0;",
"numa",
"0",
"int numb = 0;",
"numb",
"0",
"for(int i=0; i<k; i++) {\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<k",
"i",
"k",
"i++",
"i++",
"i",
"{\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }",
"{\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }",
"if(i < a) {\n ans += 1;\n } else {\n break;\n }",
"i < a",
"i",
"a",
"{\n ans += 1;\n }",
"ans += 1",
"ans",
"1",
"{\n break;\n }",
"break;",
"numa++",
"numa",
"if(numa == k) printAns(ans);",
"numa == k",
"numa",
"k",
"printAns(ans)",
"printAns",
"ans",
"for(int j=0; j<k-numa; j++) {\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<k-numa",
"j",
"k-numa",
"k",
"numa",
"j++",
"j++",
"j",
"{\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }",
"{\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }",
"if(j < b) {\n ;\n } else {\n break;\n }",
"j < b",
"j",
"b",
"{\n ;\n }",
"{\n break;\n }",
"break;",
"numb++",
"numb",
"if(numa+numb == k) printAns(ans);",
"numa+numb == k",
"numa+numb",
"numa",
"numb",
"k",
"printAns(ans)",
"printAns",
"ans",
"for(int l=0; l<k-(numa+numb); l++) {\n if(l < c) {\n ans += -1;\n }\n }",
"int l=0;",
"int l=0;",
"l",
"0",
"l<k-(numa+numb)",
"l",
"k-(numa+numb)",
"k",
"(numa+numb)",
"numa",
"numb",
"l++",
"l++",
"l",
"{\n if(l < c) {\n ans += -1;\n }\n }",
"{\n if(l < c) {\n ans += -1;\n }\n }",
"if(l < c) {\n ans += -1;\n }",
"l < c",
"l",
"c",
"{\n ans += -1;\n }",
"ans += -1",
"ans",
"-1",
"1",
"printAns(ans)",
"printAns",
"ans",
"String[] args",
"args",
"public static void printAns(int ans) {\n System.out.println(ans);\n System.exit(0);\n }",
"printAns",
"{\n System.out.println(ans);\n System.exit(0);\n }",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"System.exit(0)",
"System.exit",
"System",
"0",
"int ans",
"ans",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int numa = 0;\n int numb = 0;\n for(int i=0; i<k; i++) {\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }\n if(numa == k) printAns(ans);\n\n for(int j=0; j<k-numa; j++) {\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }\n if(numa+numb == k) printAns(ans);\n\n for(int l=0; l<k-(numa+numb); l++) {\n if(l < c) {\n ans += -1;\n }\n }\n printAns(ans);\n }\n\n public static void printAns(int ans) {\n System.out.println(ans);\n System.exit(0);\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 int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n\n int ans = 0;\n int numa = 0;\n int numb = 0;\n for(int i=0; i<k; i++) {\n if(i < a) {\n ans += 1;\n } else {\n break;\n }\n numa++;\n }\n if(numa == k) printAns(ans);\n\n for(int j=0; j<k-numa; j++) {\n if(j < b) {\n ;\n } else {\n break;\n }\n numb++;\n }\n if(numa+numb == k) printAns(ans);\n\n for(int l=0; l<k-(numa+numb); l++) {\n if(l < c) {\n ans += -1;\n }\n }\n printAns(ans);\n }\n\n public static void printAns(int ans) {\n System.out.println(ans);\n System.exit(0);\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();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int ans = 0;
int numa = 0;
int numb = 0;
for(int i=0; i<k; i++) {
if(i < a) {
ans += 1;
} else {
break;
}
numa++;
}
if(numa == k) printAns(ans);
for(int j=0; j<k-numa; j++) {
if(j < b) {
;
} else {
break;
}
numb++;
}
if(numa+numb == k) printAns(ans);
for(int l=0; l<k-(numa+numb); l++) {
if(l < c) {
ans += -1;
}
}
printAns(ans);
}
public static void printAns(int ans) {
System.out.println(ans);
System.exit(0);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
17,
14,
2,
13,
2,
13,
13,
30,
0,
13,
2,
13,
17,
14,
2,
13,
2,
2,
13,
13,
13,
30,
0,
13,
2,
13,
40,
17,
30,
0,
13,
2,
2,
2,
13,
13,
13,
40,
17,
14,
2,
13,
2,
13,
13,
30,
0,
13,
2,
2,
13,
13,
13,
30,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
124,
5
],
[
124,
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
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
73,
73
],
[
73,
74
],
[
73,
75
],
[
73,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
69,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
57,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
47,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
8,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
6,
121
],
[
121,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n\n int max = 0;\n\n if(a < k){\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }else{\n max += k*1;\n }\n\n System.out.println(max);\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 a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n\n int max = 0;\n\n if(a < k){\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }else{\n max += k*1;\n }\n\n System.out.println(max);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n\n int max = 0;\n\n if(a < k){\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }else{\n max += k*1;\n }\n\n System.out.println(max);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n\n int max = 0;\n\n if(a < k){\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }else{\n max += k*1;\n }\n\n System.out.println(max);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = Integer.parseInt(sc.next());",
"a",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int b = Integer.parseInt(sc.next());",
"b",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int c = Integer.parseInt(sc.next());",
"c",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int k = Integer.parseInt(sc.next());",
"k",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int max = 0;",
"max",
"0",
"if(a < k){\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }else{\n max += k*1;\n }",
"a < k",
"a",
"k",
"{\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }",
"max += a*1",
"max",
"a*1",
"a",
"1",
"if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }",
"b <= k-a",
"b",
"k-a",
"k",
"a",
"{\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }",
"max += b*0",
"max",
"b*0",
"b",
"0",
"if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }",
"c <= k - a - b",
"c",
"k - a - b",
"k - a - b",
"k",
"a",
"b",
"{\n max += c*(-1);\n }",
"max += c*(-1)",
"max",
"c*(-1)",
"c",
"(-1)",
"1",
"{\n max += (k - a - b)*(-1);\n }",
"max += (k - a - b)*(-1)",
"max",
"(k - a - b)*(-1)",
"(k - a - b)",
"k - a - b",
"k",
"a",
"b",
"(-1)",
"1",
"if(b > k-a){\n max += (k-a)*b;\n }",
"b > k-a",
"b",
"k-a",
"k",
"a",
"{\n max += (k-a)*b;\n }",
"max += (k-a)*b",
"max",
"(k-a)*b",
"(k-a)",
"k",
"a",
"b",
"{\n max += k*1;\n }",
"max += k*1",
"max",
"k*1",
"k",
"1",
"System.out.println(max)",
"System.out.println",
"System.out",
"System",
"System.out",
"max",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n\n int max = 0;\n\n if(a < k){\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }else{\n max += k*1;\n }\n\n System.out.println(max);\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n int c = Integer.parseInt(sc.next());\n int k = Integer.parseInt(sc.next());\n\n int max = 0;\n\n if(a < k){\n max += a*1;\n if(b <= k-a){\n max += b*0;\n if(c <= k - a - b){\n max += c*(-1);\n }else{\n max += (k - a - b)*(-1);\n }\n }else if(b > k-a){\n max += (k-a)*b;\n }\n }else{\n max += k*1;\n }\n\n System.out.println(max);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int c = Integer.parseInt(sc.next());
int k = Integer.parseInt(sc.next());
int max = 0;
if(a < k){
max += a*1;
if(b <= k-a){
max += b*0;
if(c <= k - a - b){
max += c*(-1);
}else{
max += (k - a - b)*(-1);
}
}else if(b > k-a){
max += (k-a)*b;
}
}else{
max += k*1;
}
System.out.println(max);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
40,
17,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
2,
13,
2,
13,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
89,
5
],
[
89,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
62,
68
],
[
50,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
76,
82
],
[
75,
83
],
[
83,
84
],
[
83,
85
],
[
6,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n int A = 1;\n int B = 0;\n int C = -1;\n int a,b,c;\n int n;\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n n = sc.nextInt();\n if(a + b >= n)\n {\n System.out.println(Math.min(a,n)*A);\n }\n else\n {\n System.out.println((n-(a+b))*C+ a*A);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n int A = 1;\n int B = 0;\n int C = -1;\n int a,b,c;\n int n;\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n n = sc.nextInt();\n if(a + b >= n)\n {\n System.out.println(Math.min(a,n)*A);\n }\n else\n {\n System.out.println((n-(a+b))*C+ a*A);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n int A = 1;\n int B = 0;\n int C = -1;\n int a,b,c;\n int n;\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n n = sc.nextInt();\n if(a + b >= n)\n {\n System.out.println(Math.min(a,n)*A);\n }\n else\n {\n System.out.println((n-(a+b))*C+ a*A);\n }\n }",
"main",
"{\n int A = 1;\n int B = 0;\n int C = -1;\n int a,b,c;\n int n;\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n n = sc.nextInt();\n if(a + b >= n)\n {\n System.out.println(Math.min(a,n)*A);\n }\n else\n {\n System.out.println((n-(a+b))*C+ a*A);\n }\n }",
"int A = 1;",
"A",
"1",
"int B = 0;",
"B",
"0",
"int C = -1;",
"C",
"-1",
"1",
"int a",
"a",
"b",
"b",
"c;",
"c",
"int n;",
"n",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c = sc.nextInt()",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a + b >= n)\n {\n System.out.println(Math.min(a,n)*A);\n }\n else\n {\n System.out.println((n-(a+b))*C+ a*A);\n }",
"a + b >= n",
"a + b",
"a",
"b",
"n",
"{\n System.out.println(Math.min(a,n)*A);\n }",
"System.out.println(Math.min(a,n)*A)",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.min(a,n)*A",
"Math.min(a,n)",
"Math.min",
"Math",
"a",
"n",
"A",
"{\n System.out.println((n-(a+b))*C+ a*A);\n }",
"System.out.println((n-(a+b))*C+ a*A)",
"System.out.println",
"System.out",
"System",
"System.out",
"(n-(a+b))*C+ a*A",
"(n-(a+b))*C",
"(n-(a+b))",
"n",
"(a+b)",
"a",
"b",
"C",
"a*A",
"a",
"A",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n int A = 1;\n int B = 0;\n int C = -1;\n int a,b,c;\n int n;\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n n = sc.nextInt();\n if(a + b >= n)\n {\n System.out.println(Math.min(a,n)*A);\n }\n else\n {\n System.out.println((n-(a+b))*C+ a*A);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n int A = 1;\n int B = 0;\n int C = -1;\n int a,b,c;\n int n;\n Scanner sc = new Scanner(System.in);\n a = sc.nextInt();\n b = sc.nextInt();\n c = sc.nextInt();\n n = sc.nextInt();\n if(a + b >= n)\n {\n System.out.println(Math.min(a,n)*A);\n }\n else\n {\n System.out.println((n-(a+b))*C+ a*A);\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int A = 1;
int B = 0;
int C = -1;
int a,b,c;
int n;
Scanner sc = new Scanner(System.in);
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
n = sc.nextInt();
if(a + b >= n)
{
System.out.println(Math.min(a,n)*A);
}
else
{
System.out.println((n-(a+b))*C+ a*A);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
40,
13,
0,
13,
2,
13,
13,
30,
0,
13,
40,
13,
4,
18,
18,
13,
13,
13,
23,
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,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
148,
8
],
[
148,
9
],
[
9,
10
],
[
148,
11
],
[
11,
12
],
[
148,
13
],
[
13,
14
],
[
148,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
17,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
17,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
17,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
40,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
17,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
17,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
74,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
17,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
15,
99
],
[
99,
100
],
[
148,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
108,
109
],
[
148,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
148,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
148,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
131,
140
],
[
140,
141
],
[
140,
142
],
[
130,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
0,
147
],
[
147,
148
],
[
147,
149
]
] |
[
"import java.util.*; \nimport java.io.*;\n\npublic class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n \n int A = nextInt();//health \n int B = nextInt();//strength \n int C = nextInt();\n int K = nextInt();\n \n int sum = 0;\n \n if(K>=A){\n sum += A;\n K = K-A;\n }\n else{\n sum += K;\n K=0;\n }\n if(K>=B){ \n K = K-B;\n } \n else{\n K=0;\n }\n if(K>=C){\n sum += -C;\n K = K-A;\n }\n else{\n sum += -K;\n }\n \n System.out.println(sum);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n \n int A = nextInt();//health \n int B = nextInt();//strength \n int C = nextInt();\n int K = nextInt();\n \n int sum = 0;\n \n if(K>=A){\n sum += A;\n K = K-A;\n }\n else{\n sum += K;\n K=0;\n }\n if(K>=B){ \n K = K-B;\n } \n else{\n K=0;\n }\n if(K>=C){\n sum += -C;\n K = K-A;\n }\n else{\n sum += -K;\n }\n \n System.out.println(sum);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"Main",
"static StringTokenizer st;",
"st",
"static BufferedReader br;",
"br",
"static PrintWriter out;",
"out",
"public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n \n int A = nextInt();//health \n int B = nextInt();//strength \n int C = nextInt();\n int K = nextInt();\n \n int sum = 0;\n \n if(K>=A){\n sum += A;\n K = K-A;\n }\n else{\n sum += K;\n K=0;\n }\n if(K>=B){ \n K = K-B;\n } \n else{\n K=0;\n }\n if(K>=C){\n sum += -C;\n K = K-A;\n }\n else{\n sum += -K;\n }\n \n System.out.println(sum);\n }",
"main",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n\n \n int A = nextInt();//health \n int B = nextInt();//strength \n int C = nextInt();\n int K = nextInt();\n \n int sum = 0;\n \n if(K>=A){\n sum += A;\n K = K-A;\n }\n else{\n sum += K;\n K=0;\n }\n if(K>=B){ \n K = K-B;\n } \n else{\n K=0;\n }\n if(K>=C){\n sum += -C;\n K = K-A;\n }\n else{\n sum += -K;\n }\n \n System.out.println(sum);\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int A = nextInt();",
"A",
"nextInt()",
"nextInt",
"int B = nextInt();",
"B",
"nextInt()",
"nextInt",
"int C = nextInt();",
"C",
"nextInt()",
"nextInt",
"int K = nextInt();",
"K",
"nextInt()",
"nextInt",
"int sum = 0;",
"sum",
"0",
"if(K>=A){\n sum += A;\n K = K-A;\n }\n else{\n sum += K;\n K=0;\n }",
"K>=A",
"K",
"A",
"{\n sum += A;\n K = K-A;\n }",
"sum += A",
"sum",
"A",
"K = K-A",
"K",
"K-A",
"K",
"A",
"{\n sum += K;\n K=0;\n }",
"sum += K",
"sum",
"K",
"K=0",
"K",
"0",
"if(K>=B){ \n K = K-B;\n } \n else{\n K=0;\n }",
"K>=B",
"K",
"B",
"{ \n K = K-B;\n }",
"K = K-B",
"K",
"K-B",
"K",
"B",
"{\n K=0;\n }",
"K=0",
"K",
"0",
"if(K>=C){\n sum += -C;\n K = K-A;\n }\n else{\n sum += -K;\n }",
"K>=C",
"K",
"C",
"{\n sum += -C;\n K = K-A;\n }",
"sum += -C",
"sum",
"-C",
"C",
"K = K-A",
"K",
"K-A",
"K",
"A",
"{\n sum += -K;\n }",
"sum += -K",
"sum",
"-K",
"K",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public static 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 static 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 static double nextDouble() throws IOException {\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",
"static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine().trim())",
"st",
"new StringTokenizer(br.readLine().trim())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n \n int A = nextInt();//health \n int B = nextInt();//strength \n int C = nextInt();\n int K = nextInt();\n \n int sum = 0;\n \n if(K>=A){\n sum += A;\n K = K-A;\n }\n else{\n sum += K;\n K=0;\n }\n if(K>=B){ \n K = K-B;\n } \n else{\n K=0;\n }\n if(K>=C){\n sum += -C;\n K = K-A;\n }\n else{\n sum += -K;\n }\n \n System.out.println(sum);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n\n \n int A = nextInt();//health \n int B = nextInt();//strength \n int C = nextInt();\n int K = nextInt();\n \n int sum = 0;\n \n if(K>=A){\n sum += A;\n K = K-A;\n }\n else{\n sum += K;\n K=0;\n }\n if(K>=B){ \n K = K-B;\n } \n else{\n K=0;\n }\n if(K>=C){\n sum += -C;\n K = K-A;\n }\n else{\n sum += -K;\n }\n \n System.out.println(sum);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"Main"
] |
import java.util.*;
import java.io.*;
public class Main {
static StringTokenizer st;
static BufferedReader br;
static PrintWriter out;
public static void main(String[] args) throws IOException {
br = new BufferedReader(new InputStreamReader(System.in));
int A = nextInt();//health
int B = nextInt();//strength
int C = nextInt();
int K = nextInt();
int sum = 0;
if(K>=A){
sum += A;
K = K-A;
}
else{
sum += K;
K=0;
}
if(K>=B){
K = K-B;
}
else{
K=0;
}
if(K>=C){
sum += -C;
K = K-A;
}
else{
sum += -K;
}
System.out.println(sum);
}
public static int nextInt() throws IOException {
return Integer.parseInt(next());
}
public static long nextLong() throws IOException {
return Long.parseLong(next());
}
public static double nextDouble() throws IOException {
return Double.parseDouble(next());
}
static String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
13,
0,
13,
8,
2,
2,
2,
13,
13,
13,
17,
2,
2,
13,
13,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
67,
5
],
[
67,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
45,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
44,
57
],
[
8,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
6,
64
],
[
64,
65
],
[
0,
66
],
[
66,
67
],
[
66,
68
]
] |
[
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal long A = sc.nextLong();\n\t\tfinal long B = sc.nextLong();\n\t\tfinal long C = sc.nextLong();\n\t\tfinal long K = sc.nextLong();\n\t\tsc.close();\n\t\tlong ans = Math.min(A, K);\n\t\tans -= (K-A-B)>0?(K-A-B): 0;\n\t\tSystem.out.println(ans);\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\tfinal long A = sc.nextLong();\n\t\tfinal long B = sc.nextLong();\n\t\tfinal long C = sc.nextLong();\n\t\tfinal long K = sc.nextLong();\n\t\tsc.close();\n\t\tlong ans = Math.min(A, K);\n\t\tans -= (K-A-B)>0?(K-A-B): 0;\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal long A = sc.nextLong();\n\t\tfinal long B = sc.nextLong();\n\t\tfinal long C = sc.nextLong();\n\t\tfinal long K = sc.nextLong();\n\t\tsc.close();\n\t\tlong ans = Math.min(A, K);\n\t\tans -= (K-A-B)>0?(K-A-B): 0;\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal long A = sc.nextLong();\n\t\tfinal long B = sc.nextLong();\n\t\tfinal long C = sc.nextLong();\n\t\tfinal long K = sc.nextLong();\n\t\tsc.close();\n\t\tlong ans = Math.min(A, K);\n\t\tans -= (K-A-B)>0?(K-A-B): 0;\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final long A = sc.nextLong();",
"A",
"sc.nextLong()",
"sc.nextLong",
"sc",
"final long B = sc.nextLong();",
"B",
"sc.nextLong()",
"sc.nextLong",
"sc",
"final long C = sc.nextLong();",
"C",
"sc.nextLong()",
"sc.nextLong",
"sc",
"final long K = sc.nextLong();",
"K",
"sc.nextLong()",
"sc.nextLong",
"sc",
"sc.close()",
"sc.close",
"sc",
"long ans = Math.min(A, K);",
"ans",
"Math.min(A, K)",
"Math.min",
"Math",
"A",
"K",
"ans -= (K-A-B)>0?(K-A-B): 0",
"ans",
"(K-A-B)>0?(K-A-B): 0",
"(K-A-B)>0",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"0",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"0",
"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\t\tScanner sc = new Scanner(System.in);\n\t\tfinal long A = sc.nextLong();\n\t\tfinal long B = sc.nextLong();\n\t\tfinal long C = sc.nextLong();\n\t\tfinal long K = sc.nextLong();\n\t\tsc.close();\n\t\tlong ans = Math.min(A, K);\n\t\tans -= (K-A-B)>0?(K-A-B): 0;\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tfinal long A = sc.nextLong();\n\t\tfinal long B = sc.nextLong();\n\t\tfinal long C = sc.nextLong();\n\t\tfinal long K = sc.nextLong();\n\t\tsc.close();\n\t\tlong ans = Math.min(A, K);\n\t\tans -= (K-A-B)>0?(K-A-B): 0;\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final long A = sc.nextLong();
final long B = sc.nextLong();
final long C = sc.nextLong();
final long K = sc.nextLong();
sc.close();
long ans = Math.min(A, K);
ans -= (K-A-B)>0?(K-A-B): 0;
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
0,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
80,
5
],
[
80,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
39,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
57,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
6,
77
],
[
77,
78
],
[
0,
79
],
[
79,
80
],
[
79,
81
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String... args) {\n Scanner input = new Scanner(System.in);\n \n long a = input.nextLong();\n long b = input.nextLong();\n long c = input.nextLong();\n long k = input.nextLong();\n \n int ans = 0;\n if (k <= a) {\n System.out.println(k);\n return;\n }\n \n ans += a;\n k -= a;\n if (k <= b) {\n System.out.println(ans);\n return;\n }\n k -= b;\n ans -= k;\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 input = new Scanner(System.in);\n \n long a = input.nextLong();\n long b = input.nextLong();\n long c = input.nextLong();\n long k = input.nextLong();\n \n int ans = 0;\n if (k <= a) {\n System.out.println(k);\n return;\n }\n \n ans += a;\n k -= a;\n if (k <= b) {\n System.out.println(ans);\n return;\n }\n k -= b;\n ans -= k;\n \n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String... args) {\n Scanner input = new Scanner(System.in);\n \n long a = input.nextLong();\n long b = input.nextLong();\n long c = input.nextLong();\n long k = input.nextLong();\n \n int ans = 0;\n if (k <= a) {\n System.out.println(k);\n return;\n }\n \n ans += a;\n k -= a;\n if (k <= b) {\n System.out.println(ans);\n return;\n }\n k -= b;\n ans -= k;\n \n System.out.println(ans);\n }",
"main",
"{\n Scanner input = new Scanner(System.in);\n \n long a = input.nextLong();\n long b = input.nextLong();\n long c = input.nextLong();\n long k = input.nextLong();\n \n int ans = 0;\n if (k <= a) {\n System.out.println(k);\n return;\n }\n \n ans += a;\n k -= a;\n if (k <= b) {\n System.out.println(ans);\n return;\n }\n k -= b;\n ans -= k;\n \n System.out.println(ans);\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"long a = input.nextLong();",
"a",
"input.nextLong()",
"input.nextLong",
"input",
"long b = input.nextLong();",
"b",
"input.nextLong()",
"input.nextLong",
"input",
"long c = input.nextLong();",
"c",
"input.nextLong()",
"input.nextLong",
"input",
"long k = input.nextLong();",
"k",
"input.nextLong()",
"input.nextLong",
"input",
"int ans = 0;",
"ans",
"0",
"if (k <= a) {\n System.out.println(k);\n return;\n }",
"k <= a",
"k",
"a",
"{\n System.out.println(k);\n return;\n }",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"return;",
"ans += a",
"ans",
"a",
"k -= a",
"k",
"a",
"if (k <= b) {\n System.out.println(ans);\n return;\n }",
"k <= b",
"k",
"b",
"{\n System.out.println(ans);\n return;\n }",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return;",
"k -= b",
"k",
"b",
"ans -= k",
"ans",
"k",
"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 input = new Scanner(System.in);\n \n long a = input.nextLong();\n long b = input.nextLong();\n long c = input.nextLong();\n long k = input.nextLong();\n \n int ans = 0;\n if (k <= a) {\n System.out.println(k);\n return;\n }\n \n ans += a;\n k -= a;\n if (k <= b) {\n System.out.println(ans);\n return;\n }\n k -= b;\n ans -= k;\n \n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String... args) {\n Scanner input = new Scanner(System.in);\n \n long a = input.nextLong();\n long b = input.nextLong();\n long c = input.nextLong();\n long k = input.nextLong();\n \n int ans = 0;\n if (k <= a) {\n System.out.println(k);\n return;\n }\n \n ans += a;\n k -= a;\n if (k <= b) {\n System.out.println(ans);\n return;\n }\n k -= b;\n ans -= k;\n \n System.out.println(ans);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String... args) {
Scanner input = new Scanner(System.in);
long a = input.nextLong();
long b = input.nextLong();
long c = input.nextLong();
long k = input.nextLong();
int ans = 0;
if (k <= a) {
System.out.println(k);
return;
}
ans += a;
k -= a;
if (k <= b) {
System.out.println(ans);
return;
}
k -= b;
ans -= k;
System.out.println(ans);
}
}
|
[
7,
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,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
17,
2,
13,
13,
0,
13,
4,
18,
13,
17,
2,
13,
13,
4,
18,
13,
2,
13,
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,
30,
29,
18,
13,
40,
13,
30,
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,
30,
40,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
30,
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,
14,
40,
4,
13,
30,
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,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
30,
37,
20,
29,
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
],
[
367,
17
],
[
367,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
20,
34
],
[
34,
35
],
[
35,
36
],
[
18,
37
],
[
37,
38
],
[
0,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
39,
47
],
[
47,
48
],
[
39,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
51,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
49,
72
],
[
72,
73
],
[
39,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
76,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
76,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
76,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
74,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
110,
117
],
[
117,
118
],
[
117,
119
],
[
110,
121
],
[
121,
122
],
[
121,
123
],
[
110,
124
],
[
124,
125
],
[
124,
126
],
[
110,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
135,
136
],
[
130,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
141,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
137,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
129,
162
],
[
162,
163
],
[
110,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
167,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
110,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
188,
190
],
[
180,
191
],
[
191,
192
],
[
110,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
197,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
203,
205
],
[
196,
206
],
[
206,
207
],
[
207,
208
],
[
195,
209
],
[
209,
210
],
[
210,
211
],
[
110,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
215,
219
],
[
219,
220
],
[
220,
221
],
[
214,
222
],
[
222,
223
],
[
222,
224
],
[
214,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
214,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
234,
237
],
[
233,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
214,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
110,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
249,
253
],
[
253,
254
],
[
254,
255
],
[
248,
256
],
[
256,
257
],
[
256,
258
],
[
248,
259
],
[
259,
260
],
[
259,
261
],
[
248,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
248,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
270,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
248,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
283,
284
],
[
283,
285
],
[
278,
286
],
[
286,
287
],
[
287,
288
],
[
248,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
297,
298
],
[
297,
299
],
[
292,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
300,
304
],
[
304,
305
],
[
304,
306
],
[
306,
307
],
[
306,
308
],
[
292,
309
],
[
309,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
313,
314
],
[
310,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
309,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
321,
325
],
[
309,
326
],
[
326,
327
],
[
327,
328
],
[
291,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
110,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
335,
340
],
[
340,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
344,
346
],
[
341,
347
],
[
347,
348
],
[
347,
349
],
[
349,
350
],
[
349,
351
],
[
340,
352
],
[
352,
353
],
[
353,
354
],
[
335,
355
],
[
355,
356
],
[
110,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
360,
361
],
[
361,
362
],
[
362,
363
],
[
361,
364
],
[
364,
365
],
[
0,
366
],
[
366,
367
],
[
366,
368
]
] |
[
"\nimport java.text.DecimalFormat;\nimport java.util.stream.LongStream;\nimport java.util.stream.IntStream;\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}\n\nclass AtCoder {\n\n final int A, B, C, K;\n\n AtCoder(FastScanner sc) {\n A = sc.nextInt();\n B = sc.nextInt();\n C = sc.nextInt();\n K = sc.nextInt();\n }\n\n void solve(PrintWriter out) {\n int ans = Math.min(A, K);\n int k = Math.max(0, K - A);\n k = Math.max(0, k - B);\n out.println(ans - k);\n }\n\n}\n\n// https://qiita.com/p_shiki37/items/a0f6aac33bf60f5f65e4\nclass FastScanner {\n\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }\n\n public String next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n}",
"import java.text.DecimalFormat;",
"DecimalFormat",
"java.text",
"import java.util.stream.LongStream;",
"LongStream",
"java.util.stream",
"import java.util.stream.IntStream;",
"IntStream",
"java.util.stream",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}",
"Main",
"public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }",
"main",
"{\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"AtCoder problem = new AtCoder(sc);",
"problem",
"new AtCoder(sc)",
"problem.solve(out)",
"problem.solve",
"problem",
"out",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"class AtCoder {\n\n final int A, B, C, K;\n\n AtCoder(FastScanner sc) {\n A = sc.nextInt();\n B = sc.nextInt();\n C = sc.nextInt();\n K = sc.nextInt();\n }\n\n void solve(PrintWriter out) {\n int ans = Math.min(A, K);\n int k = Math.max(0, K - A);\n k = Math.max(0, k - B);\n out.println(ans - k);\n }\n\n}",
"AtCoder",
"final int A",
"A",
"B",
"B",
"C",
"C",
"K;",
"K",
"AtCoder(FastScanner sc) {\n A = sc.nextInt();\n B = sc.nextInt();\n C = sc.nextInt();\n K = sc.nextInt();\n }",
"AtCoder",
"{\n A = sc.nextInt();\n B = sc.nextInt();\n C = sc.nextInt();\n K = sc.nextInt();\n }",
"A = sc.nextInt()",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"B = sc.nextInt()",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"C = sc.nextInt()",
"C",
"sc.nextInt()",
"sc.nextInt",
"sc",
"K = sc.nextInt()",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"FastScanner sc",
"sc",
"void solve(PrintWriter out) {\n int ans = Math.min(A, K);\n int k = Math.max(0, K - A);\n k = Math.max(0, k - B);\n out.println(ans - k);\n }",
"solve",
"{\n int ans = Math.min(A, K);\n int k = Math.max(0, K - A);\n k = Math.max(0, k - B);\n out.println(ans - k);\n }",
"int ans = Math.min(A, K);",
"ans",
"Math.min(A, K)",
"Math.min",
"Math",
"A",
"K",
"int k = Math.max(0, K - A);",
"k",
"Math.max(0, K - A)",
"Math.max",
"Math",
"0",
"K - A",
"K",
"A",
"k = Math.max(0, k - B)",
"k",
"Math.max(0, k - B)",
"Math.max",
"Math",
"0",
"k - B",
"k",
"B",
"out.println(ans - k)",
"out.println",
"out",
"ans - k",
"ans",
"k",
"PrintWriter out",
"out",
"class FastScanner {\n\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() {\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }\n\n private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }\n\n public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }\n\n public String next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n}",
"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 if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"hasNextByte",
"{\n if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"if (ptr < buflen) {\n return true;\n } else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr < buflen",
"ptr",
"buflen",
"{\n return true;\n }",
"return true;",
"true",
"{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr = 0",
"ptr",
"0",
"try {\n buflen = in.read(buffer);\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 buflen = in.read(buffer);\n }",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n return false;\n }",
"buflen <= 0",
"buflen",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }",
"readByte",
"{\n if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }\n }",
"if (hasNextByte()) {\n return buffer[ptr++];\n } else {\n return -1;\n }",
"hasNextByte()",
"hasNextByte",
"{\n return buffer[ptr++];\n }",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n return 33 <= c && c <= 126;\n }",
"isPrintableChar",
"{\n return 33 <= c && c <= 126;\n }",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }",
"hasNext",
"{\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n return hasNextByte();\n }",
"while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"{\n ptr++;\n }",
"ptr++",
"ptr",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"next",
"{\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"if (!hasNext()) {\n throw new NoSuchElementException();\n }",
"!hasNext()",
"hasNext()",
"hasNext",
"{\n throw new NoSuchElementException();\n }",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n sb.appendCodePoint(b);\n b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"nextLong",
"{\n if (!hasNext()) {\n throw new NoSuchElementException();\n }\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"if (!hasNext()) {\n throw new NoSuchElementException();\n }",
"!hasNext()",
"hasNext()",
"hasNext",
"{\n throw new NoSuchElementException();\n }",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"true",
"{\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n n *= 10;\n n += b - '0';\n }",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n return minus ? -n : n;\n }",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }",
"nextInt",
"{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }\n return (int) nl;\n }",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {\n throw new NumberFormatException();\n }",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public 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",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n\n AtCoder problem = new AtCoder(sc);\n problem.solve(out);\n\n out.flush();\n }\n\n}",
"Main"
] |
import java.text.DecimalFormat;
import java.util.stream.LongStream;
import java.util.stream.IntStream;
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner sc = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
AtCoder problem = new AtCoder(sc);
problem.solve(out);
out.flush();
}
}
class AtCoder {
final int A, B, C, K;
AtCoder(FastScanner sc) {
A = sc.nextInt();
B = sc.nextInt();
C = sc.nextInt();
K = sc.nextInt();
}
void solve(PrintWriter out) {
int ans = Math.min(A, K);
int k = Math.max(0, K - A);
k = Math.max(0, k - B);
out.println(ans - k);
}
}
// https://qiita.com/p_shiki37/items/a0f6aac33bf60f5f65e4
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;
}
public boolean hasNext() {
while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
ptr++;
}
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 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() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) {
throw new NumberFormatException();
}
return (int) nl;
}
public double nextDouble() {
return Double.parseDouble(next());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
13,
40,
13,
14,
2,
13,
17,
30,
3,
14,
2,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
13,
14,
2,
13,
17,
30,
3,
14,
2,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
40,
13,
40,
13,
14,
2,
2,
13,
17,
2,
13,
13,
30,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
130,
5
],
[
130,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
52,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
106,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
8,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
6,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\t//1の枚数\n\t\tint b = sc.nextInt();\t//0の枚数\n\t\tint c = sc.nextInt();\t//-1の枚数\n\t\tint k = sc.nextInt();\t//選択の枚数\n\n\t\tint sum = 0;\n\t\t//1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//0を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t}\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\n\t\tint a = sc.nextInt();\t//1の枚数\n\t\tint b = sc.nextInt();\t//0の枚数\n\t\tint c = sc.nextInt();\t//-1の枚数\n\t\tint k = sc.nextInt();\t//選択の枚数\n\n\t\tint sum = 0;\n\t\t//1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//0を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\t//1の枚数\n\t\tint b = sc.nextInt();\t//0の枚数\n\t\tint c = sc.nextInt();\t//-1の枚数\n\t\tint k = sc.nextInt();\t//選択の枚数\n\n\t\tint sum = 0;\n\t\t//1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//0を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\t//1の枚数\n\t\tint b = sc.nextInt();\t//0の枚数\n\t\tint c = sc.nextInt();\t//-1の枚数\n\t\tint k = sc.nextInt();\t//選択の枚数\n\n\t\tint sum = 0;\n\t\t//1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//0を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = 0;",
"sum",
"0",
"if(k>0) {\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"k>0",
"k",
"0",
"{\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < a",
"i",
"a",
"i++",
"i++",
"i",
"{\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"sum++",
"sum",
"k--",
"k",
"if(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"k == 0",
"k",
"0",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if(k>0) {\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"k>0",
"k",
"0",
"{\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < b",
"i",
"b",
"i++",
"i++",
"i",
"{\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"k--",
"k",
"if(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"k == 0",
"k",
"0",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if(k>0) {\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"k>0",
"k",
"0",
"{\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < c",
"i",
"c",
"i++",
"i++",
"i",
"{\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"sum--",
"sum",
"k--",
"k",
"if(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"k == 0 || k > c",
"k == 0",
"k",
"0",
"k > c",
"k",
"c",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\t//1の枚数\n\t\tint b = sc.nextInt();\t//0の枚数\n\t\tint c = sc.nextInt();\t//-1の枚数\n\t\tint k = sc.nextInt();\t//選択の枚数\n\n\t\tint sum = 0;\n\t\t//1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//0を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\t//1の枚数\n\t\tint b = sc.nextInt();\t//0の枚数\n\t\tint c = sc.nextInt();\t//-1の枚数\n\t\tint k = sc.nextInt();\t//選択の枚数\n\n\t\tint sum = 0;\n\t\t//1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < a; i++) {\n\t\t\t\tsum++;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//0を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < b; i++) {\n\t\t\t\tk--;\n\t\t\t\tif(k == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//-1を取り出せるか?\n\t\tif(k>0) {\n\t\t\tfor(int i=0; i < c; i++) {\n\t\t\t\tsum--;\n\t\t\t\tk--;\n\t\t\t\tif(k == 0 || k > c) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t}\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(); //1の枚数
int b = sc.nextInt(); //0の枚数
int c = sc.nextInt(); //-1の枚数
int k = sc.nextInt(); //選択の枚数
int sum = 0;
//1を取り出せるか?
if(k>0) {
for(int i=0; i < a; i++) {
sum++;
k--;
if(k == 0) {
break;
}
}
}
//0を取り出せるか?
if(k>0) {
for(int i=0; i < b; i++) {
k--;
if(k == 0) {
break;
}
}
}
//-1を取り出せるか?
if(k>0) {
for(int i=0; i < c; i++) {
sum--;
k--;
if(k == 0 || k > c) {
break;
}
}
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
0,
13,
4,
18,
13,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
13,
13,
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
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
8,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
6,
66
],
[
66,
67
],
[
0,
68
],
[
68,
69
],
[
68,
70
]
] |
[
"import java.util.*;\n \npublic class Main{\n public static void main(String[]args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n ans += Math.min(a,k);\n k -= a;\n k -= b;\n if(k > 0){\n ans -= Math.min(c,k);\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 a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n ans += Math.min(a,k);\n k -= a;\n k -= b;\n if(k > 0){\n ans -= Math.min(c,k);\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[]args){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n ans += Math.min(a,k);\n k -= a;\n k -= b;\n if(k > 0){\n ans -= Math.min(c,k);\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n ans += Math.min(a,k);\n k -= a;\n k -= b;\n if(k > 0){\n ans -= Math.min(c,k);\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"ans += Math.min(a,k)",
"ans",
"Math.min(a,k)",
"Math.min",
"Math",
"a",
"k",
"k -= a",
"k",
"a",
"k -= b",
"k",
"b",
"if(k > 0){\n ans -= Math.min(c,k);\n }",
"k > 0",
"k",
"0",
"{\n ans -= Math.min(c,k);\n }",
"ans -= Math.min(c,k)",
"ans",
"Math.min(c,k)",
"Math.min",
"Math",
"c",
"k",
"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 a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n ans += Math.min(a,k);\n k -= a;\n k -= b;\n if(k > 0){\n ans -= Math.min(c,k);\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 a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n ans += Math.min(a,k);\n k -= a;\n k -= b;\n if(k > 0){\n ans -= Math.min(c,k);\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 a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int ans = 0;
ans += Math.min(a,k);
k -= a;
k -= b;
if(k > 0){
ans -= Math.min(c,k);
}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
0,
13,
2,
13,
17,
40,
13,
14,
2,
13,
17,
30,
0,
13,
2,
13,
17,
30,
0,
13,
2,
13,
17,
0,
13,
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
],
[
93,
5
],
[
93,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
52,
58
],
[
58,
59
],
[
48,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
8,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
6,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint A = stdIn.nextInt();\n\t\tint B = stdIn.nextInt();\n\t\tint C = stdIn.nextInt();\n\t\tint K = stdIn.nextInt();\n\t\tint ans = 0;\n\t\tfor(int a = 0; a < K; a++){\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tstdIn.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint A = stdIn.nextInt();\n\t\tint B = stdIn.nextInt();\n\t\tint C = stdIn.nextInt();\n\t\tint K = stdIn.nextInt();\n\t\tint ans = 0;\n\t\tfor(int a = 0; a < K; a++){\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tstdIn.close();\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint A = stdIn.nextInt();\n\t\tint B = stdIn.nextInt();\n\t\tint C = stdIn.nextInt();\n\t\tint K = stdIn.nextInt();\n\t\tint ans = 0;\n\t\tfor(int a = 0; a < K; a++){\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tstdIn.close();\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint A = stdIn.nextInt();\n\t\tint B = stdIn.nextInt();\n\t\tint C = stdIn.nextInt();\n\t\tint K = stdIn.nextInt();\n\t\tint ans = 0;\n\t\tfor(int a = 0; a < K; a++){\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tstdIn.close();\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int A = stdIn.nextInt();",
"A",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int B = stdIn.nextInt();",
"B",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int C = stdIn.nextInt();",
"C",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int K = stdIn.nextInt();",
"K",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int ans = 0;",
"ans",
"0",
"for(int a = 0; a < K; a++){\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}",
"int a = 0;",
"int a = 0;",
"a",
"0",
"a < K",
"a",
"K",
"a++",
"a++",
"a",
"{\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}",
"if(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}",
"A > 0",
"A",
"0",
"{\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}",
"A = A - 1",
"A",
"A - 1",
"A",
"1",
"ans++",
"ans",
"if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}",
"B > 0",
"B",
"0",
"{\n\t\t\t\tB = B - 1;\n\t\t\t}",
"B = B - 1",
"B",
"B - 1",
"B",
"1",
"{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}",
"C = C - 1",
"C",
"C - 1",
"C",
"1",
"ans = ans - 1",
"ans",
"ans - 1",
"ans",
"1",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"stdIn.close()",
"stdIn.close",
"stdIn",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint A = stdIn.nextInt();\n\t\tint B = stdIn.nextInt();\n\t\tint C = stdIn.nextInt();\n\t\tint K = stdIn.nextInt();\n\t\tint ans = 0;\n\t\tfor(int a = 0; a < K; a++){\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tstdIn.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint A = stdIn.nextInt();\n\t\tint B = stdIn.nextInt();\n\t\tint C = stdIn.nextInt();\n\t\tint K = stdIn.nextInt();\n\t\tint ans = 0;\n\t\tfor(int a = 0; a < K; a++){\n\t\t\tif(A > 0){\n\t\t\t\tA = A - 1;\n\t\t\t\tans++;\n\t\t\t}\n\t\t\telse if(B > 0){\n\t\t\t\tB = B - 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tC = C - 1;\n\t\t\t\tans = ans - 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t\tstdIn.close();\n\t}\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();
int B = stdIn.nextInt();
int C = stdIn.nextInt();
int K = stdIn.nextInt();
int ans = 0;
for(int a = 0; a < K; a++){
if(A > 0){
A = A - 1;
ans++;
}
else if(B > 0){
B = B - 1;
}
else{
C = C - 1;
ans = ans - 1;
}
}
System.out.println(ans);
stdIn.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
17,
0,
13,
4,
18,
13,
13,
13,
0,
13,
4,
18,
13,
17,
2,
13,
13,
0,
13,
4,
18,
13,
17,
2,
13,
13,
0,
13,
4,
18,
13,
13,
13,
4,
13,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
40,
13,
17,
4,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
17,
2,
17,
4,
13,
2,
13,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
2,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
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,
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
],
[
348,
11
],
[
348,
12
],
[
12,
13
],
[
348,
14
],
[
14,
15
],
[
348,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
348,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
23,
40
],
[
40,
41
],
[
40,
42
],
[
23,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
45,
49
],
[
23,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
52,
56
],
[
56,
57
],
[
56,
58
],
[
23,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
65,
66
],
[
65,
67
],
[
23,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
23,
75
],
[
75,
76
],
[
75,
77
],
[
348,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
80,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
80,
92
],
[
92,
93
],
[
92,
94
],
[
80,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
95,
100
],
[
100,
101
],
[
80,
102
],
[
102,
103
],
[
103,
104
],
[
80,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
111,
115
],
[
110,
116
],
[
78,
117
],
[
117,
118
],
[
348,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
119,
126
],
[
126,
127
],
[
348,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
128,
135
],
[
135,
136
],
[
348,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
144,
145
],
[
145,
146
],
[
348,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
154,
155
],
[
155,
156
],
[
348,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
161,
164
],
[
164,
165
],
[
165,
166
],
[
348,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
348,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
178,
183
],
[
183,
184
],
[
183,
185
],
[
183,
186
],
[
186,
187
],
[
186,
188
],
[
174,
189
],
[
189,
190
],
[
174,
191
],
[
191,
192
],
[
348,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
197,
202
],
[
202,
203
],
[
202,
204
],
[
202,
205
],
[
205,
206
],
[
205,
207
],
[
193,
208
],
[
208,
209
],
[
193,
210
],
[
210,
211
],
[
348,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
216,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
227,
229
],
[
212,
230
],
[
230,
231
],
[
348,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
234,
238
],
[
238,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
242,
243
],
[
242,
244
],
[
238,
245
],
[
245,
246
],
[
245,
247
],
[
238,
248
],
[
248,
249
],
[
249,
250
],
[
238,
251
],
[
252,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
256,
257
],
[
255,
258
],
[
258,
259
],
[
258,
260
],
[
252,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
263,
265
],
[
252,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
270,
271
],
[
270,
272
],
[
252,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
273,
277
],
[
234,
278
],
[
278,
279
],
[
279,
280
],
[
278,
281
],
[
232,
282
],
[
282,
283
],
[
232,
284
],
[
284,
285
],
[
348,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
286,
290
],
[
290,
291
],
[
286,
292
],
[
292,
293
],
[
292,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
286,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
301,
310
],
[
310,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
315,
316
],
[
316,
317
],
[
311,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
300,
322
],
[
322,
323
],
[
323,
324
],
[
324,
325
],
[
286,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
332,
339
],
[
339,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
343,
344
],
[
328,
345
],
[
345,
346
],
[
0,
347
],
[
347,
348
],
[
347,
349
]
] |
[
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n \npublic class Main\n{\n public static void process()throws IOException\n {\n long a=nl(),b=nl(),c=nl(),k=nl(),res=0l;\n\n res+=Math.min(k, a);\n k=Math.max(0, k-a);\n\n k=Math.max(0, k-b);\n\n res-=Math.min(k, c);\n\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\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{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main\n{\n public static void process()throws IOException\n {\n long a=nl(),b=nl(),c=nl(),k=nl(),res=0l;\n\n res+=Math.min(k, a);\n k=Math.max(0, k-a);\n\n k=Math.max(0, k-b);\n\n res-=Math.min(k, c);\n\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\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{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"Main",
"static FastReader sc;",
"sc",
"static PrintWriter out;",
"out",
"static long mod=(long)1e9+7l;",
"mod",
"(long)1e9+7l",
"(long)1e9",
"7l",
"public static void process()throws IOException\n {\n long a=nl(),b=nl(),c=nl(),k=nl(),res=0l;\n\n res+=Math.min(k, a);\n k=Math.max(0, k-a);\n\n k=Math.max(0, k-b);\n\n res-=Math.min(k, c);\n\n pn(res);\n }",
"process",
"{\n long a=nl(),b=nl(),c=nl(),k=nl(),res=0l;\n\n res+=Math.min(k, a);\n k=Math.max(0, k-a);\n\n k=Math.max(0, k-b);\n\n res-=Math.min(k, c);\n\n pn(res);\n }",
"long a=nl()",
"a",
"nl()",
"nl",
"b=nl()",
"b",
"nl()",
"nl",
"c=nl()",
"c",
"nl()",
"nl",
"k=nl()",
"k",
"nl()",
"nl",
"res=0l;",
"res",
"0l",
"res+=Math.min(k, a)",
"res",
"Math.min(k, a)",
"Math.min",
"Math",
"k",
"a",
"k=Math.max(0, k-a)",
"k",
"Math.max(0, k-a)",
"Math.max",
"Math",
"0",
"k-a",
"k",
"a",
"k=Math.max(0, k-b)",
"k",
"Math.max(0, k-b)",
"Math.max",
"Math",
"0",
"k-b",
"k",
"b",
"res-=Math.min(k, c)",
"res",
"Math.min(k, c)",
"Math.min",
"Math",
"k",
"c",
"pn(res)",
"pn",
"res",
"public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }",
"main",
"{\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"sc=new FastReader()",
"sc",
"new FastReader()",
"long s = System.currentTimeMillis();",
"s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"int t=1;",
"t",
"1",
"while(t-->0)\n process();",
"t-->0",
"t--",
"t",
"0",
"process()",
"process",
"out.flush()",
"out.flush",
"out",
"System.err.println(System.currentTimeMillis()-s+\"ms\")",
"System.err.println",
"System.err",
"System",
"System.err",
"System.currentTimeMillis()-s+\"ms\"",
"System.currentTimeMillis()-s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"s",
"\"ms\"",
"String[]args",
"args",
"static void pn(Object o){out.println(o);}",
"pn",
"{out.println(o);}",
"out.println(o)",
"out.println",
"out",
"o",
"Object o",
"o",
"static void p(Object o){out.print(o);}",
"p",
"{out.print(o);}",
"out.print(o)",
"out.print",
"out",
"o",
"Object o",
"o",
"static int ni()throws IOException{return Integer.parseInt(sc.next());}",
"ni",
"{return Integer.parseInt(sc.next());}",
"return Integer.parseInt(sc.next());",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"static long nl()throws IOException{return Long.parseLong(sc.next());}",
"nl",
"{return Long.parseLong(sc.next());}",
"return Long.parseLong(sc.next());",
"Long.parseLong(sc.next())",
"Long.parseLong",
"Long",
"sc.next()",
"sc.next",
"sc",
"static double nd()throws IOException{return Double.parseDouble(sc.next());}",
"nd",
"{return Double.parseDouble(sc.next());}",
"return Double.parseDouble(sc.next());",
"Double.parseDouble(sc.next())",
"Double.parseDouble",
"Double",
"sc.next()",
"sc.next",
"sc",
"static String nln()throws IOException{return sc.nextLine();}",
"nln",
"{return sc.nextLine();}",
"return sc.nextLine();",
"sc.nextLine()",
"sc.nextLine",
"sc",
"static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}",
"gcd",
"{return (b==0)?a:gcd(b,a%b);}",
"return (b==0)?a:gcd(b,a%b);",
"(b==0)?a:gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}",
"gcd",
"{return (b==0)?a:gcd(b,a%b);}",
"return (b==0)?a:gcd(b,a%b);",
"(b==0)?a:gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}",
"bit",
"{return (n==0)?0:(1+bit(n&(n-1)));}",
"return (n==0)?0:(1+bit(n&(n-1)));",
"(n==0)?0:(1+bit(n&(n-1)))",
"(n==0)",
"n",
"0",
"0",
"(1+bit(n&(n-1)))",
"1",
"bit(n&(n-1))",
"bit",
"n&(n-1)",
"n",
"(n-1)",
"n",
"1",
"long n",
"n",
"static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }",
"r_sort",
"{\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }",
"Random r = new Random();",
"r",
"new Random()",
"for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n }",
"int i = n-1;",
"int i = n-1;",
"i",
"n-1",
"n",
"1",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n }",
"{ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n }",
"int j = r.nextInt(i+1);",
"j",
"r.nextInt(i+1)",
"r.nextInt",
"r",
"i+1",
"i",
"1",
"T temp = arr[i];",
"temp",
"arr[i]",
"arr",
"i",
"arr[i] = arr[j]",
"arr[i]",
"arr",
"i",
"arr[j]",
"arr",
"j",
"arr[j] = temp",
"arr[j]",
"arr",
"j",
"temp",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"T arr[]",
"arr",
"int 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{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \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{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n }",
"next",
"{ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n }",
"while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n }",
"try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); }",
"catch (IOException e){ e.printStackTrace(); }",
"IOException e",
"{ e.printStackTrace(); }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ st = new StringTokenizer(br.readLine()); }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n }",
"nextLine",
"{ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n }",
"String str = \"\";",
"str",
"\"\"",
"try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); }",
"catch (IOException e) { e.printStackTrace(); }",
"IOException e",
"{ e.printStackTrace(); }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ str = br.readLine(); }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{\n public static void process()throws IOException\n {\n long a=nl(),b=nl(),c=nl(),k=nl(),res=0l;\n\n res+=Math.min(k, a);\n k=Math.max(0, k-a);\n\n k=Math.max(0, k-b);\n\n res-=Math.min(k, c);\n\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\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{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"public class Main\n{\n public static void process()throws IOException\n {\n long a=nl(),b=nl(),c=nl(),k=nl(),res=0l;\n\n res+=Math.min(k, a);\n k=Math.max(0, k-a);\n\n k=Math.max(0, k-b);\n\n res-=Math.min(k, c);\n\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\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{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"Main"
] |
import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
public static void process()throws IOException
{
long a=nl(),b=nl(),c=nl(),k=nl(),res=0l;
res+=Math.min(k, a);
k=Math.max(0, k-a);
k=Math.max(0, k-b);
res-=Math.min(k, c);
pn(res);
}
static FastReader sc;
static PrintWriter out;
public static void main(String[]args)throws IOException
{
out = new PrintWriter(System.out);
sc=new FastReader();
long s = System.currentTimeMillis();
int t=1;
// t=ni();
while(t-->0)
process();
out.flush();
System.err.println(System.currentTimeMillis()-s+"ms");
}
static void pn(Object o){out.println(o);}
static void p(Object o){out.print(o);}
static int ni()throws IOException{return Integer.parseInt(sc.next());}
static long nl()throws IOException{return Long.parseLong(sc.next());}
static double nd()throws IOException{return Double.parseDouble(sc.next());}
static String nln()throws IOException{return sc.nextLine();}
static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}
static long mod=(long)1e9+7l;
static<T> void r_sort(T arr[],int n){
Random r = new Random();
for (int i = n-1; i > 0; i--){
int j = r.nextInt(i+1);
T temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
Arrays.sort(arr);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
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();
}
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
13,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
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
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
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 Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int result = Math.min(a, k);\n k -= a + b;\n if (k > 0) {\n result -= k;\n }\n System.out.println(result);\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 a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int result = Math.min(a, k);\n k -= a + b;\n if (k > 0) {\n result -= k;\n }\n System.out.println(result);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int result = Math.min(a, k);\n k -= a + b;\n if (k > 0) {\n result -= k;\n }\n System.out.println(result);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int result = Math.min(a, k);\n k -= a + b;\n if (k > 0) {\n result -= k;\n }\n System.out.println(result);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int a = scanner.nextInt();",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int b = scanner.nextInt();",
"b",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int c = scanner.nextInt();",
"c",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int k = scanner.nextInt();",
"k",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int result = Math.min(a, k);",
"result",
"Math.min(a, k)",
"Math.min",
"Math",
"a",
"k",
"k -= a + b",
"k",
"a + b",
"a",
"b",
"if (k > 0) {\n result -= k;\n }",
"k > 0",
"k",
"0",
"{\n result -= k;\n }",
"result -= k",
"result",
"k",
"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 Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int result = Math.min(a, k);\n k -= a + b;\n if (k > 0) {\n result -= k;\n }\n System.out.println(result);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int c = scanner.nextInt();\n int k = scanner.nextInt();\n\n int result = Math.min(a, k);\n k -= a + b;\n if (k > 0) {\n result -= k;\n }\n System.out.println(result);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
int k = scanner.nextInt();
int result = Math.min(a, k);
k -= a + b;
if (k > 0) {
result -= k;
}
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
13,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
46,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong(),k=sc.nextLong();\n long res=0;\n if(k<=a) {\n \tSystem.out.println(k);\n }else if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\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 long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong(),k=sc.nextLong();\n long res=0;\n if(k<=a) {\n \tSystem.out.println(k);\n }else if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong(),k=sc.nextLong();\n long res=0;\n if(k<=a) {\n \tSystem.out.println(k);\n }else if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong(),k=sc.nextLong();\n long res=0;\n if(k<=a) {\n \tSystem.out.println(k);\n }else if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long a=sc.nextLong()",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"b=sc.nextLong()",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"c=sc.nextLong()",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"k=sc.nextLong();",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long res=0;",
"res",
"0",
"if(k<=a) {\n \tSystem.out.println(k);\n }else if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\n }",
"k<=a",
"k",
"a",
"{\n \tSystem.out.println(k);\n }",
"System.out.println(k)",
"System.out.println",
"System.out",
"System",
"System.out",
"k",
"if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\n }",
"k<=a+b",
"k",
"a+b",
"a",
"b",
"{\n \tSystem.out.println(a);\n }",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"{\n \tSystem.out.println(a-(k-a-b));\n }",
"System.out.println(a-(k-a-b))",
"System.out.println",
"System.out",
"System",
"System.out",
"a-(k-a-b)",
"a",
"(k-a-b)",
"k-a-b",
"k",
"a",
"b",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong(),k=sc.nextLong();\n long res=0;\n if(k<=a) {\n \tSystem.out.println(k);\n }else if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong(),k=sc.nextLong();\n long res=0;\n if(k<=a) {\n \tSystem.out.println(k);\n }else if(k<=a+b){\n \tSystem.out.println(a);\n }else {\n \tSystem.out.println(a-(k-a-b));\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long a=sc.nextLong(),b=sc.nextLong(),c=sc.nextLong(),k=sc.nextLong();
long res=0;
if(k<=a) {
System.out.println(k);
}else if(k<=a+b){
System.out.println(a);
}else {
System.out.println(a-(k-a-b));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
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
],
[
87,
5
],
[
87,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
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
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
51,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
62,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
] |
[
"import java.util.Scanner;\n\n//public class Begginer05 {\n\tpublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tsc.close();\n\n\t\tint sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K ; i++) {\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"\tpublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tsc.close();\n\n\t\tint sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K ; i++) {\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tsc.close();\n\n\t\tint sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K ; i++) {\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tsc.close();\n\n\t\tint sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K ; i++) {\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int C = sc.nextInt();",
"C",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"int sum = 0;",
"sum",
"0",
"for (int i = 0; i < K ; i++) {\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < K",
"i",
"K",
"i++",
"i++",
"i",
"{\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}",
"if (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}",
"A != 0",
"A",
"0",
"{\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t}",
"sum += 1",
"sum",
"1",
"A -= 1",
"A",
"1",
"if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}",
"A == 0 && B != 0",
"A == 0",
"A",
"0",
"B != 0",
"B",
"0",
"{\n\t\t\t\tB -= 1;\n\t\t\t}",
"B -= 1",
"B",
"1",
"{\n\t\t\t\tsum -= 1;\n\t\t\t}",
"sum -= 1",
"sum",
"1",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"\tpublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tsc.close();\n\n\t\tint sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K ; i++) {\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"\tpublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint C = sc.nextInt();\n\t\tint K = sc.nextInt();\n\t\tsc.close();\n\n\t\tint sum = 0;\n\t\t\n\t\tfor (int i = 0; i < K ; i++) {\n\t\t\tif (A != 0) {\n\t\t\t\tsum += 1;\n\t\t\t\tA -= 1;\n\t\t\t} else if (A == 0 && B != 0) {\n\t\t\t\tB -= 1;\n\t\t\t} else {\n\t\t\t\tsum -= 1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
//public class Begginer05 {
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int K = sc.nextInt();
sc.close();
int sum = 0;
for (int i = 0; i < K ; i++) {
if (A != 0) {
sum += 1;
A -= 1;
} else if (A == 0 && B != 0) {
B -= 1;
} else {
sum -= 1;
}
}
System.out.println(sum);
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
2,
40,
17,
2,
2,
13,
13,
13,
30,
14,
2,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
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
],
[
0,
13
],
[
13,
14
],
[
13,
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
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
17,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
17,
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
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
41,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
15,
80
],
[
80,
81
]
] |
[
"import java.util.*;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.math.*;\nclass Main{\n public static void main(String[]args){\n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A+B<=K){\n System.out.println(A+(-1)*(K-A-B));\n }\n else{\n if(A>=K) System.out.println(K);\n else System.out.println(A);\n }\n\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.util.List;",
"List",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.math.*;",
"math.*",
"java",
"class Main{\n public static void main(String[]args){\n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A+B<=K){\n System.out.println(A+(-1)*(K-A-B));\n }\n else{\n if(A>=K) System.out.println(K);\n else System.out.println(A);\n }\n\n }\n\n}",
"Main",
"public static void main(String[]args){\n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A+B<=K){\n System.out.println(A+(-1)*(K-A-B));\n }\n else{\n if(A>=K) System.out.println(K);\n else System.out.println(A);\n }\n\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n\n if(A+B<=K){\n System.out.println(A+(-1)*(K-A-B));\n }\n else{\n if(A>=K) System.out.println(K);\n else System.out.println(A);\n }\n\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int A = scanner.nextInt();",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int B = scanner.nextInt();",
"B",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int C = scanner.nextInt();",
"C",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int K = scanner.nextInt();",
"K",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if(A+B<=K){\n System.out.println(A+(-1)*(K-A-B));\n }\n else{\n if(A>=K) System.out.println(K);\n else System.out.println(A);\n }",
"A+B<=K",
"A+B",
"A",
"B",
"K",
"{\n System.out.println(A+(-1)*(K-A-B));\n }",
"System.out.println(A+(-1)*(K-A-B))",
"System.out.println",
"System.out",
"System",
"System.out",
"A+(-1)*(K-A-B)",
"A",
"(-1)*(K-A-B)",
"(-1)",
"1",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"{\n if(A>=K) System.out.println(K);\n else System.out.println(A);\n }",
"if(A>=K) System.out.println(K);\n else System.out.println(A);",
"A>=K",
"A",
"K",
"System.out.println(K)",
"System.out.println",
"System.out",
"System",
"System.out",
"K",
"System.out.println(A)",
"System.out.println",
"System.out",
"System",
"System.out",
"A",
"String[]args",
"args"
] |
import java.util.*;
import java.util.List;
import java.util.ArrayList;
import java.math.*;
class Main{
public static void main(String[]args){
Scanner scanner = new Scanner(System.in);
int A = scanner.nextInt();
int B = scanner.nextInt();
int C = scanner.nextInt();
int K = scanner.nextInt();
if(A+B<=K){
System.out.println(A+(-1)*(K-A-B));
}
else{
if(A>=K) System.out.println(K);
else System.out.println(A);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
4,
13,
13,
13,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
30,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
121,
8
],
[
121,
9
],
[
9,
10
],
[
9,
11
],
[
121,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
20,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
33,
35
],
[
14,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
41,
43
],
[
14,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
49,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
57,
59
],
[
14,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
63,
67
],
[
63,
68
],
[
14,
69
],
[
69,
70
],
[
70,
71
],
[
14,
72
],
[
72,
73
],
[
73,
74
],
[
12,
75
],
[
75,
76
],
[
121,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
95,
97
],
[
91,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
98,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
79,
110
],
[
110,
111
],
[
77,
112
],
[
112,
113
],
[
77,
114
],
[
114,
115
],
[
77,
116
],
[
116,
117
],
[
77,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
] |
[
"import java.util.*;\nimport java.io.*;\n\npublic class Main{\n\tstatic PrintWriter out=new PrintWriter(System.out);\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString[] input=br.readLine().trim().split(\" \");\n\t\t\n\t\t\n\t\tint a=Integer.parseInt(input[0]);\n\t\tint b=Integer.parseInt(input[1]);\n\t\tint c=Integer.parseInt(input[2]);\n\t\tint k=Integer.parseInt(input[3]);\n\t\t\n\t\t\n\t\tout.println(maxSum(a,b,c,k));\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}\n\tpublic static int maxSum(int a,int b,int c,int k)\n\t{\n\t int ans=0;\n\t if(a>=k){\n\t ans+=k;\n\t }\n\t else{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }\n\t return ans;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n\tstatic PrintWriter out=new PrintWriter(System.out);\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString[] input=br.readLine().trim().split(\" \");\n\t\t\n\t\t\n\t\tint a=Integer.parseInt(input[0]);\n\t\tint b=Integer.parseInt(input[1]);\n\t\tint c=Integer.parseInt(input[2]);\n\t\tint k=Integer.parseInt(input[3]);\n\t\t\n\t\t\n\t\tout.println(maxSum(a,b,c,k));\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}\n\tpublic static int maxSum(int a,int b,int c,int k)\n\t{\n\t int ans=0;\n\t if(a>=k){\n\t ans+=k;\n\t }\n\t else{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }\n\t return ans;\n\t}\n}",
"Main",
"static PrintWriter out=new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"public static void main (String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString[] input=br.readLine().trim().split(\" \");\n\t\t\n\t\t\n\t\tint a=Integer.parseInt(input[0]);\n\t\tint b=Integer.parseInt(input[1]);\n\t\tint c=Integer.parseInt(input[2]);\n\t\tint k=Integer.parseInt(input[3]);\n\t\t\n\t\t\n\t\tout.println(maxSum(a,b,c,k));\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}",
"main",
"{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString[] input=br.readLine().trim().split(\" \");\n\t\t\n\t\t\n\t\tint a=Integer.parseInt(input[0]);\n\t\tint b=Integer.parseInt(input[1]);\n\t\tint c=Integer.parseInt(input[2]);\n\t\tint k=Integer.parseInt(input[3]);\n\t\t\n\t\t\n\t\tout.println(maxSum(a,b,c,k));\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String[] input=br.readLine().trim().split(\" \");",
"input",
"br.readLine().trim().split(\" \")",
"br.readLine().trim().split",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int a=Integer.parseInt(input[0]);",
"a",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"int b=Integer.parseInt(input[1]);",
"b",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"int c=Integer.parseInt(input[2]);",
"c",
"Integer.parseInt(input[2])",
"Integer.parseInt",
"Integer",
"input[2]",
"input",
"2",
"int k=Integer.parseInt(input[3]);",
"k",
"Integer.parseInt(input[3])",
"Integer.parseInt",
"Integer",
"input[3]",
"input",
"3",
"out.println(maxSum(a,b,c,k))",
"out.println",
"out",
"maxSum(a,b,c,k)",
"maxSum",
"a",
"b",
"c",
"k",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public static int maxSum(int a,int b,int c,int k)\n\t{\n\t int ans=0;\n\t if(a>=k){\n\t ans+=k;\n\t }\n\t else{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }\n\t return ans;\n\t}",
"maxSum",
"{\n\t int ans=0;\n\t if(a>=k){\n\t ans+=k;\n\t }\n\t else{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }\n\t return ans;\n\t}",
"int ans=0;",
"ans",
"0",
"if(a>=k){\n\t ans+=k;\n\t }\n\t else{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }",
"a>=k",
"a",
"k",
"{\n\t ans+=k;\n\t }",
"ans+=k",
"ans",
"k",
"{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }",
"ans+=a",
"ans",
"a",
"k-=a",
"k",
"a",
"if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }",
"b>=k",
"b",
"k",
"{\n\t \n\t }",
"{\n\t k-=b;\n\t ans-=k;\n\t }",
"k-=b",
"k",
"b",
"ans-=k",
"ans",
"k",
"return ans;",
"ans",
"int a",
"a",
"int b",
"b",
"int c",
"c",
"int k",
"k",
"public class Main{\n\tstatic PrintWriter out=new PrintWriter(System.out);\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString[] input=br.readLine().trim().split(\" \");\n\t\t\n\t\t\n\t\tint a=Integer.parseInt(input[0]);\n\t\tint b=Integer.parseInt(input[1]);\n\t\tint c=Integer.parseInt(input[2]);\n\t\tint k=Integer.parseInt(input[3]);\n\t\t\n\t\t\n\t\tout.println(maxSum(a,b,c,k));\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}\n\tpublic static int maxSum(int a,int b,int c,int k)\n\t{\n\t int ans=0;\n\t if(a>=k){\n\t ans+=k;\n\t }\n\t else{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }\n\t return ans;\n\t}\n}",
"public class Main{\n\tstatic PrintWriter out=new PrintWriter(System.out);\n\tpublic static void main (String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString[] input=br.readLine().trim().split(\" \");\n\t\t\n\t\t\n\t\tint a=Integer.parseInt(input[0]);\n\t\tint b=Integer.parseInt(input[1]);\n\t\tint c=Integer.parseInt(input[2]);\n\t\tint k=Integer.parseInt(input[3]);\n\t\t\n\t\t\n\t\tout.println(maxSum(a,b,c,k));\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}\n\tpublic static int maxSum(int a,int b,int c,int k)\n\t{\n\t int ans=0;\n\t if(a>=k){\n\t ans+=k;\n\t }\n\t else{\n\t ans+=a;\n\t k-=a;\n\t if(b>=k){\n\t \n\t }\n\t else{\n\t k-=b;\n\t ans-=k;\n\t }\n\t }\n\t return ans;\n\t}\n}",
"Main"
] |
import java.util.*;
import java.io.*;
public class Main{
static PrintWriter out=new PrintWriter(System.out);
public static void main (String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String[] input=br.readLine().trim().split(" ");
int a=Integer.parseInt(input[0]);
int b=Integer.parseInt(input[1]);
int c=Integer.parseInt(input[2]);
int k=Integer.parseInt(input[3]);
out.println(maxSum(a,b,c,k));
out.flush();
out.close();
}
public static int maxSum(int a,int b,int c,int k)
{
int ans=0;
if(a>=k){
ans+=k;
}
else{
ans+=a;
k-=a;
if(b>=k){
}
else{
k-=b;
ans-=k;
}
}
return ans;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
13,
13,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
0,
13,
2,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
23,
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
],
[
125,
11
],
[
125,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
20,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
31,
33
],
[
14,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
39,
41
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
47,
49
],
[
14,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
14,
58
],
[
58,
59
],
[
58,
60
],
[
58,
61
],
[
58,
62
],
[
58,
63
],
[
12,
64
],
[
64,
65
],
[
125,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
76,
83
],
[
68,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
68,
89
],
[
89,
90
],
[
89,
91
],
[
68,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
96,
103
],
[
68,
104
],
[
104,
105
],
[
104,
106
],
[
68,
107
],
[
107,
108
],
[
107,
109
],
[
68,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
66,
116
],
[
116,
117
],
[
66,
118
],
[
118,
119
],
[
66,
120
],
[
120,
121
],
[
66,
122
],
[
122,
123
],
[
0,
124
],
[
124,
125
],
[
124,
126
]
] |
[
"import javax.swing.*;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args)throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String[] s=br.readLine().split(\" \");\n\n int n1=Integer.parseInt(s[0]);\n int n2=Integer.parseInt(s[1]);\n int n3=Integer.parseInt(s[2]);\n int max=Integer.parseInt(s[3]);\n algo(n1,n2,n3,max);\n }\n\n public static void algo(int n1,int n2,int n3,int max)\n {\n int sum=0;\n if(n1>=max)\n {\n System.out.println(max);\n return;\n }\n max=max-n1;\n sum+=n1;\n if(n2>=max)\n {\n System.out.println(sum);\n return;\n }\n max-=n2;\n sum-=max;\n System.out.println(sum);\n }\n\n\n}",
"import javax.swing.*;",
"swing.*",
"javax",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n public static void main(String[] args)throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String[] s=br.readLine().split(\" \");\n\n int n1=Integer.parseInt(s[0]);\n int n2=Integer.parseInt(s[1]);\n int n3=Integer.parseInt(s[2]);\n int max=Integer.parseInt(s[3]);\n algo(n1,n2,n3,max);\n }\n\n public static void algo(int n1,int n2,int n3,int max)\n {\n int sum=0;\n if(n1>=max)\n {\n System.out.println(max);\n return;\n }\n max=max-n1;\n sum+=n1;\n if(n2>=max)\n {\n System.out.println(sum);\n return;\n }\n max-=n2;\n sum-=max;\n System.out.println(sum);\n }\n\n\n}",
"Main",
"public static void main(String[] args)throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String[] s=br.readLine().split(\" \");\n\n int n1=Integer.parseInt(s[0]);\n int n2=Integer.parseInt(s[1]);\n int n3=Integer.parseInt(s[2]);\n int max=Integer.parseInt(s[3]);\n algo(n1,n2,n3,max);\n }",
"main",
"{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String[] s=br.readLine().split(\" \");\n\n int n1=Integer.parseInt(s[0]);\n int n2=Integer.parseInt(s[1]);\n int n3=Integer.parseInt(s[2]);\n int max=Integer.parseInt(s[3]);\n algo(n1,n2,n3,max);\n }",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String[] s=br.readLine().split(\" \");",
"s",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int n1=Integer.parseInt(s[0]);",
"n1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"int n2=Integer.parseInt(s[1]);",
"n2",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"int n3=Integer.parseInt(s[2]);",
"n3",
"Integer.parseInt(s[2])",
"Integer.parseInt",
"Integer",
"s[2]",
"s",
"2",
"int max=Integer.parseInt(s[3]);",
"max",
"Integer.parseInt(s[3])",
"Integer.parseInt",
"Integer",
"s[3]",
"s",
"3",
"algo(n1,n2,n3,max)",
"algo",
"n1",
"n2",
"n3",
"max",
"String[] args",
"args",
"public static void algo(int n1,int n2,int n3,int max)\n {\n int sum=0;\n if(n1>=max)\n {\n System.out.println(max);\n return;\n }\n max=max-n1;\n sum+=n1;\n if(n2>=max)\n {\n System.out.println(sum);\n return;\n }\n max-=n2;\n sum-=max;\n System.out.println(sum);\n }",
"algo",
"{\n int sum=0;\n if(n1>=max)\n {\n System.out.println(max);\n return;\n }\n max=max-n1;\n sum+=n1;\n if(n2>=max)\n {\n System.out.println(sum);\n return;\n }\n max-=n2;\n sum-=max;\n System.out.println(sum);\n }",
"int sum=0;",
"sum",
"0",
"if(n1>=max)\n {\n System.out.println(max);\n return;\n }",
"n1>=max",
"n1",
"max",
"{\n System.out.println(max);\n return;\n }",
"System.out.println(max)",
"System.out.println",
"System.out",
"System",
"System.out",
"max",
"return;",
"max=max-n1",
"max",
"max-n1",
"max",
"n1",
"sum+=n1",
"sum",
"n1",
"if(n2>=max)\n {\n System.out.println(sum);\n return;\n }",
"n2>=max",
"n2",
"max",
"{\n System.out.println(sum);\n return;\n }",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"return;",
"max-=n2",
"max",
"n2",
"sum-=max",
"sum",
"max",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"int n1",
"n1",
"int n2",
"n2",
"int n3",
"n3",
"int max",
"max",
"public class Main {\n public static void main(String[] args)throws Exception\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String[] s=br.readLine().split(\" \");\n\n int n1=Integer.parseInt(s[0]);\n int n2=Integer.parseInt(s[1]);\n int n3=Integer.parseInt(s[2]);\n int max=Integer.parseInt(s[3]);\n algo(n1,n2,n3,max);\n }\n\n public static void algo(int n1,int n2,int n3,int max)\n {\n int sum=0;\n if(n1>=max)\n {\n System.out.println(max);\n return;\n }\n max=max-n1;\n sum+=n1;\n if(n2>=max)\n {\n System.out.println(sum);\n return;\n }\n max-=n2;\n sum-=max;\n System.out.println(sum);\n }\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 String[] s=br.readLine().split(\" \");\n\n int n1=Integer.parseInt(s[0]);\n int n2=Integer.parseInt(s[1]);\n int n3=Integer.parseInt(s[2]);\n int max=Integer.parseInt(s[3]);\n algo(n1,n2,n3,max);\n }\n\n public static void algo(int n1,int n2,int n3,int max)\n {\n int sum=0;\n if(n1>=max)\n {\n System.out.println(max);\n return;\n }\n max=max-n1;\n sum+=n1;\n if(n2>=max)\n {\n System.out.println(sum);\n return;\n }\n max-=n2;\n sum-=max;\n System.out.println(sum);\n }\n\n\n}",
"Main"
] |
import javax.swing.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)throws Exception
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String[] s=br.readLine().split(" ");
int n1=Integer.parseInt(s[0]);
int n2=Integer.parseInt(s[1]);
int n3=Integer.parseInt(s[2]);
int max=Integer.parseInt(s[3]);
algo(n1,n2,n3,max);
}
public static void algo(int n1,int n2,int n3,int max)
{
int sum=0;
if(n1>=max)
{
System.out.println(max);
return;
}
max=max-n1;
sum+=n1;
if(n2>=max)
{
System.out.println(sum);
return;
}
max-=n2;
sum-=max;
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
14,
2,
13,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
29,
4,
18,
18,
13,
13,
2,
13,
2,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
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
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
10,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
10,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
38,
45
],
[
10,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
52,
59
],
[
10,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }\n }",
"main",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }",
"{\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int C = sc.nextInt();",
"C",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (K <= A) {\n System.out.println(K);\n return;\n }",
"K <= A",
"K",
"A",
"{\n System.out.println(K);\n return;\n }",
"System.out.println(K)",
"System.out.println",
"System.out",
"System",
"System.out",
"K",
"return;",
"if (K <= A + B) {\n System.out.println(A);\n return;\n }",
"K <= A + B",
"K",
"A + B",
"A",
"B",
"{\n System.out.println(A);\n return;\n }",
"System.out.println(A)",
"System.out.println",
"System.out",
"System",
"System.out",
"A",
"return;",
"System.out.println(A - (K - (A + B)))",
"System.out.println",
"System.out",
"System",
"System.out",
"A - (K - (A + B))",
"A",
"(K - (A + B))",
"K",
"(A + B)",
"A",
"B",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n if (K <= A) {\n System.out.println(K);\n return;\n }\n if (K <= A + B) {\n System.out.println(A);\n return;\n }\n System.out.println(A - (K - (A + B)));\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int K = sc.nextInt();
if (K <= A) {
System.out.println(K);
return;
}
if (K <= A + B) {
System.out.println(A);
return;
}
System.out.println(A - (K - (A + B)));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
0,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
81,
5
],
[
81,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
35,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
49,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
49,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
65,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
6,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
] |
[
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner input=new Scanner(System.in);\n int a=input.nextInt();\n int b=input.nextInt();\n int c=input.nextInt();\n int k=input.nextInt();\n int result=0;\n if(k<=a){\n result+=k;\n System.out.print(result);\n }\n else if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner input=new Scanner(System.in);\n int a=input.nextInt();\n int b=input.nextInt();\n int c=input.nextInt();\n int k=input.nextInt();\n int result=0;\n if(k<=a){\n result+=k;\n System.out.print(result);\n }\n else if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner input=new Scanner(System.in);\n int a=input.nextInt();\n int b=input.nextInt();\n int c=input.nextInt();\n int k=input.nextInt();\n int result=0;\n if(k<=a){\n result+=k;\n System.out.print(result);\n }\n else if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }\n }",
"main",
"{\n Scanner input=new Scanner(System.in);\n int a=input.nextInt();\n int b=input.nextInt();\n int c=input.nextInt();\n int k=input.nextInt();\n int result=0;\n if(k<=a){\n result+=k;\n System.out.print(result);\n }\n else if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }\n }",
"Scanner input=new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int a=input.nextInt();",
"a",
"input.nextInt()",
"input.nextInt",
"input",
"int b=input.nextInt();",
"b",
"input.nextInt()",
"input.nextInt",
"input",
"int c=input.nextInt();",
"c",
"input.nextInt()",
"input.nextInt",
"input",
"int k=input.nextInt();",
"k",
"input.nextInt()",
"input.nextInt",
"input",
"int result=0;",
"result",
"0",
"if(k<=a){\n result+=k;\n System.out.print(result);\n }\n else if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }",
"k<=a",
"k",
"a",
"{\n result+=k;\n System.out.print(result);\n }",
"result+=k",
"result",
"k",
"System.out.print(result)",
"System.out.print",
"System.out",
"System",
"System.out",
"result",
"if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }",
"k<=a+b",
"k",
"a+b",
"a",
"b",
"{\n System.out.print(a);\n }",
"System.out.print(a)",
"System.out.print",
"System.out",
"System",
"System.out",
"a",
"{\n result=2*a+b-k;\n System.out.print(result);\n }",
"result=2*a+b-k",
"result",
"2*a+b-k",
"2*a+b",
"2*a",
"2",
"a",
"b",
"k",
"System.out.print(result)",
"System.out.print",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner input=new Scanner(System.in);\n int a=input.nextInt();\n int b=input.nextInt();\n int c=input.nextInt();\n int k=input.nextInt();\n int result=0;\n if(k<=a){\n result+=k;\n System.out.print(result);\n }\n else if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner input=new Scanner(System.in);\n int a=input.nextInt();\n int b=input.nextInt();\n int c=input.nextInt();\n int k=input.nextInt();\n int result=0;\n if(k<=a){\n result+=k;\n System.out.print(result);\n }\n else if(k<=a+b){\n System.out.print(a);\n }\n else {\n result=2*a+b-k;\n System.out.print(result);\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner input=new Scanner(System.in);
int a=input.nextInt();
int b=input.nextInt();
int c=input.nextInt();
int k=input.nextInt();
int result=0;
if(k<=a){
result+=k;
System.out.print(result);
}
else if(k<=a+b){
System.out.print(a);
}
else {
result=2*a+b-k;
System.out.print(result);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
2,
17,
13,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
2,
17,
13,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
14,
2,
13,
13,
30,
0,
13,
2,
13,
2,
40,
17,
13,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
2,
40,
17,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
35,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
47,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
70,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
83,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"/******************************************************************************\n\n Online Java Compiler.\n Code, Compile, Run and Debug java program online.\nWrite your code in this editor and press \"Run\" button to execute it.\n\n*******************************************************************************/\nimport java.util.*;\npublic class Main\n{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\t\tlong sum = 0;\n\t\tif(a >= k)\n\t\t{\n\t\t sum = sum + 1 * k;\n\t\t}\n\t\telse\n\t\t{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}\n\t\tk = k - b;\n\t\tif(k >= 1)\n\t\t{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}\n\t\tSystem.out.println(sum);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\t\tlong sum = 0;\n\t\tif(a >= k)\n\t\t{\n\t\t sum = sum + 1 * k;\n\t\t}\n\t\telse\n\t\t{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}\n\t\tk = k - b;\n\t\tif(k >= 1)\n\t\t{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}\n\t\tSystem.out.println(sum);\n }\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\t\tlong sum = 0;\n\t\tif(a >= k)\n\t\t{\n\t\t sum = sum + 1 * k;\n\t\t}\n\t\telse\n\t\t{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}\n\t\tk = k - b;\n\t\tif(k >= 1)\n\t\t{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}\n\t\tSystem.out.println(sum);\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\t\tlong sum = 0;\n\t\tif(a >= k)\n\t\t{\n\t\t sum = sum + 1 * k;\n\t\t}\n\t\telse\n\t\t{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}\n\t\tk = k - b;\n\t\tif(k >= 1)\n\t\t{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}\n\t\tSystem.out.println(sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long a = sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b = sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long c = sc.nextLong();",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long k = sc.nextLong();",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long sum = 0;",
"sum",
"0",
"if(a >= k)\n\t\t{\n\t\t sum = sum + 1 * k;\n\t\t}\n\t\telse\n\t\t{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}",
"a >= k",
"a",
"k",
"{\n\t\t sum = sum + 1 * k;\n\t\t}",
"sum = sum + 1 * k",
"sum",
"sum + 1 * k",
"sum",
"1 * k",
"1",
"k",
"{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}",
"k = k - a",
"k",
"k - a",
"k",
"a",
"sum = sum + 1 * a",
"sum",
"sum + 1 * a",
"sum",
"1 * a",
"1",
"a",
"k = k - b",
"k",
"k - b",
"k",
"b",
"if(k >= 1)\n\t\t{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}",
"k >= 1",
"k",
"1",
"{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}",
"if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }",
"c >= k",
"c",
"k",
"{\n\t\t sum = sum + (-1) * k;\n\t\t }",
"sum = sum + (-1) * k",
"sum",
"sum + (-1) * k",
"sum",
"(-1) * k",
"(-1)",
"1",
"k",
"{\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }",
"k = k - c",
"k",
"k - c",
"k",
"c",
"sum = sum + (-1) * c",
"sum",
"sum + (-1) * c",
"sum",
"(-1) * c",
"(-1)",
"1",
"c",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\t\tlong sum = 0;\n\t\tif(a >= k)\n\t\t{\n\t\t sum = sum + 1 * k;\n\t\t}\n\t\telse\n\t\t{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}\n\t\tk = k - b;\n\t\tif(k >= 1)\n\t\t{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}\n\t\tSystem.out.println(sum);\n }\n}",
"public class Main\n{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong c = sc.nextLong();\n\t\tlong k = sc.nextLong();\n\t\tlong sum = 0;\n\t\tif(a >= k)\n\t\t{\n\t\t sum = sum + 1 * k;\n\t\t}\n\t\telse\n\t\t{\n\t\t k = k - a;\n\t\t sum = sum + 1 * a;\n\t\t}\n\t\tk = k - b;\n\t\tif(k >= 1)\n\t\t{\n\t\t if(c >= k)\n\t\t {\n\t\t sum = sum + (-1) * k;\n\t\t }\n\t\t else\n\t\t {\n\t\t k = k - c;\n\t\t sum = sum + (-1) * c;\n\t\t }\n\t\t}\n\t\tSystem.out.println(sum);\n }\n}",
"Main"
] |
/******************************************************************************
Online Java Compiler.
Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.
*******************************************************************************/
import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long c = sc.nextLong();
long k = sc.nextLong();
long sum = 0;
if(a >= k)
{
sum = sum + 1 * k;
}
else
{
k = k - a;
sum = sum + 1 * a;
}
k = k - b;
if(k >= 1)
{
if(c >= k)
{
sum = sum + (-1) * k;
}
else
{
k = k - c;
sum = sum + (-1) * c;
}
}
System.out.println(sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
4,
18,
18,
13,
13,
13,
14,
2,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
13,
2,
2,
13,
13,
13,
29,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
14,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
33,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
54,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
8,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
] |
[
"import java.io.*;\n\npublic class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String[] arr = reader.readLine().split (\" \");\n int A = Integer.parseInt (arr[0]);\n int B = Integer.parseInt (arr[1]);\n int K = Integer.parseInt (arr[3]);\n if (K <= A)\n System.out.println (K);\n else if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));\n return;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String[] arr = reader.readLine().split (\" \");\n int A = Integer.parseInt (arr[0]);\n int B = Integer.parseInt (arr[1]);\n int K = Integer.parseInt (arr[3]);\n if (K <= A)\n System.out.println (K);\n else if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));\n return;\n }\n}",
"Main",
"public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String[] arr = reader.readLine().split (\" \");\n int A = Integer.parseInt (arr[0]);\n int B = Integer.parseInt (arr[1]);\n int K = Integer.parseInt (arr[3]);\n if (K <= A)\n System.out.println (K);\n else if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));\n return;\n }",
"main",
"{\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String[] arr = reader.readLine().split (\" \");\n int A = Integer.parseInt (arr[0]);\n int B = Integer.parseInt (arr[1]);\n int K = Integer.parseInt (arr[3]);\n if (K <= A)\n System.out.println (K);\n else if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));\n return;\n }",
"BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));",
"reader",
"new BufferedReader (new InputStreamReader (System.in))",
"String[] arr = reader.readLine().split (\" \");",
"arr",
"reader.readLine().split (\" \")",
"reader.readLine().split",
"reader.readLine()",
"reader.readLine",
"reader",
"\" \"",
"int A = Integer.parseInt (arr[0]);",
"A",
"Integer.parseInt (arr[0])",
"Integer.parseInt",
"Integer",
"arr[0]",
"arr",
"0",
"int B = Integer.parseInt (arr[1]);",
"B",
"Integer.parseInt (arr[1])",
"Integer.parseInt",
"Integer",
"arr[1]",
"arr",
"1",
"int K = Integer.parseInt (arr[3]);",
"K",
"Integer.parseInt (arr[3])",
"Integer.parseInt",
"Integer",
"arr[3]",
"arr",
"3",
"if (K <= A)\n System.out.println (K);\n else if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));",
"K <= A",
"K",
"A",
"System.out.println (K)",
"System.out.println",
"System.out",
"System",
"System.out",
"K",
"if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));",
"K <= A + B",
"K",
"A + B",
"A",
"B",
"System.out.println (A)",
"System.out.println",
"System.out",
"System",
"System.out",
"A",
"System.out.println (A - (K - A - B))",
"System.out.println",
"System.out",
"System",
"System.out",
"A - (K - A - B)",
"A",
"(K - A - B)",
"K - A - B",
"K",
"A",
"B",
"return;",
"String[] args",
"args",
"public class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String[] arr = reader.readLine().split (\" \");\n int A = Integer.parseInt (arr[0]);\n int B = Integer.parseInt (arr[1]);\n int K = Integer.parseInt (arr[3]);\n if (K <= A)\n System.out.println (K);\n else if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));\n return;\n }\n}",
"public class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader reader =\n new BufferedReader (new InputStreamReader (System.in));\n String[] arr = reader.readLine().split (\" \");\n int A = Integer.parseInt (arr[0]);\n int B = Integer.parseInt (arr[1]);\n int K = Integer.parseInt (arr[3]);\n if (K <= A)\n System.out.println (K);\n else if (K <= A + B)\n System.out.println (A);\n else\n System.out.println (A - (K - A - B));\n return;\n }\n}",
"Main"
] |
import java.io.*;
public class Main {
public static void main (String[] args) throws Exception {
BufferedReader reader =
new BufferedReader (new InputStreamReader (System.in));
String[] arr = reader.readLine().split (" ");
int A = Integer.parseInt (arr[0]);
int B = Integer.parseInt (arr[1]);
int K = Integer.parseInt (arr[3]);
if (K <= A)
System.out.println (K);
else if (K <= A + B)
System.out.println (A);
else
System.out.println (A - (K - A - B));
return;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
4,
18,
13,
13,
13,
2,
17,
4,
18,
13,
2,
13,
4,
18,
13,
13,
13,
13,
2,
40,
17,
2,
2,
13,
4,
18,
13,
13,
13,
4,
18,
13,
2,
13,
4,
18,
13,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
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
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
48,
52
],
[
43,
53
],
[
35,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
60,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
65,
75
],
[
8,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
6,
85
],
[
85,
86
]
] |
[
"import java.util.*;\n\nclass Main{\npublic static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int sum = Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b));\n System.out.println(sum);\n \n sc.close();\n}//void\n}//class",
"import java.util.*;",
"util.*",
"java",
"class Main{\npublic static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int sum = Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b));\n System.out.println(sum);\n \n sc.close();\n}//void\n}//class",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int sum = Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b));\n System.out.println(sum);\n \n sc.close();\n}//void",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int sum = Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b));\n System.out.println(sum);\n \n sc.close();\n}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int sum = Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b));",
"sum",
"Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b))",
"Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b))",
"Math.min(a,k)",
"Math.min",
"Math",
"a",
"k",
"0*(Math.min(k-Math.min(a,k),b))",
"0",
"(Math.min(k-Math.min(a,k),b))",
"Math.min",
"Math",
"k-Math.min(a,k)",
"k",
"Math.min(a,k)",
"Math.min",
"Math",
"a",
"k",
"b",
"(-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b))",
"(-1)",
"1",
"(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b))",
"k-Math.min(a,k)-Math.min(k-Math.min(a,k),b)",
"k",
"Math.min(a,k)",
"Math.min",
"Math",
"a",
"k",
"Math.min(k-Math.min(a,k),b)",
"Math.min",
"Math",
"k-Math.min(a,k)",
"k",
"Math.min(a,k)",
"Math.min",
"Math",
"a",
"k",
"b",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"sc.close()",
"sc.close",
"sc",
"String args[]",
"args"
] |
import java.util.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int sum = Math.min(a,k) + 0*(Math.min(k-Math.min(a,k),b)) + (-1)*(k-Math.min(a,k)-Math.min(k-Math.min(a,k),b));
System.out.println(sum);
sc.close();
}//void
}//class
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
2,
2,
13,
13,
13,
30,
0,
13,
2,
13,
13,
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
],
[
90,
5
],
[
90,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
65,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
52,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
44,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
6,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args ) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\tint A = input.nextInt();\n\t\tint B = input.nextInt();\n\t\tint C = input.nextInt();\n\n\t\tint K = input.nextInt();\n\n\t\tinput.close();\n\n\t\tint aNum = 0;\n\t\tint bNum = 0;\n\t\tint cNum = 0;\n\n\n\t\tif(A < K ) {\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}else {\n\n\t\t\taNum = K;\n\n\t\t}\n\n\t\tSystem.out.println(aNum - cNum);\n\n\t}\n\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args ) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\tint A = input.nextInt();\n\t\tint B = input.nextInt();\n\t\tint C = input.nextInt();\n\n\t\tint K = input.nextInt();\n\n\t\tinput.close();\n\n\t\tint aNum = 0;\n\t\tint bNum = 0;\n\t\tint cNum = 0;\n\n\n\t\tif(A < K ) {\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}else {\n\n\t\t\taNum = K;\n\n\t\t}\n\n\t\tSystem.out.println(aNum - cNum);\n\n\t}\n\n\n}",
"Main",
"public static void main(String[] args ) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\tint A = input.nextInt();\n\t\tint B = input.nextInt();\n\t\tint C = input.nextInt();\n\n\t\tint K = input.nextInt();\n\n\t\tinput.close();\n\n\t\tint aNum = 0;\n\t\tint bNum = 0;\n\t\tint cNum = 0;\n\n\n\t\tif(A < K ) {\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}else {\n\n\t\t\taNum = K;\n\n\t\t}\n\n\t\tSystem.out.println(aNum - cNum);\n\n\t}",
"main",
"{\n\t\tScanner input = new Scanner(System.in);\n\n\t\tint A = input.nextInt();\n\t\tint B = input.nextInt();\n\t\tint C = input.nextInt();\n\n\t\tint K = input.nextInt();\n\n\t\tinput.close();\n\n\t\tint aNum = 0;\n\t\tint bNum = 0;\n\t\tint cNum = 0;\n\n\n\t\tif(A < K ) {\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}else {\n\n\t\t\taNum = K;\n\n\t\t}\n\n\t\tSystem.out.println(aNum - cNum);\n\n\t}",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"int A = input.nextInt();",
"A",
"input.nextInt()",
"input.nextInt",
"input",
"int B = input.nextInt();",
"B",
"input.nextInt()",
"input.nextInt",
"input",
"int C = input.nextInt();",
"C",
"input.nextInt()",
"input.nextInt",
"input",
"int K = input.nextInt();",
"K",
"input.nextInt()",
"input.nextInt",
"input",
"input.close()",
"input.close",
"input",
"int aNum = 0;",
"aNum",
"0",
"int bNum = 0;",
"bNum",
"0",
"int cNum = 0;",
"cNum",
"0",
"if(A < K ) {\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}else {\n\n\t\t\taNum = K;\n\n\t\t}",
"A < K",
"A",
"K",
"{\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}",
"aNum = A",
"aNum",
"A",
"if(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}",
"B < K - A",
"B",
"K - A",
"K",
"A",
"{\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}",
"bNum = B",
"bNum",
"B",
"cNum = K - A - B",
"cNum",
"K - A - B",
"K - A - B",
"K",
"A",
"B",
"{\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}",
"bNum = K - A",
"bNum",
"K - A",
"K",
"A",
"{\n\n\t\t\taNum = K;\n\n\t\t}",
"aNum = K",
"aNum",
"K",
"System.out.println(aNum - cNum)",
"System.out.println",
"System.out",
"System",
"System.out",
"aNum - cNum",
"aNum",
"cNum",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args ) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\tint A = input.nextInt();\n\t\tint B = input.nextInt();\n\t\tint C = input.nextInt();\n\n\t\tint K = input.nextInt();\n\n\t\tinput.close();\n\n\t\tint aNum = 0;\n\t\tint bNum = 0;\n\t\tint cNum = 0;\n\n\n\t\tif(A < K ) {\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}else {\n\n\t\t\taNum = K;\n\n\t\t}\n\n\t\tSystem.out.println(aNum - cNum);\n\n\t}\n\n\n}",
"public class Main {\n\tpublic static void main(String[] args ) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\tint A = input.nextInt();\n\t\tint B = input.nextInt();\n\t\tint C = input.nextInt();\n\n\t\tint K = input.nextInt();\n\n\t\tinput.close();\n\n\t\tint aNum = 0;\n\t\tint bNum = 0;\n\t\tint cNum = 0;\n\n\n\t\tif(A < K ) {\n\t\t\taNum = A;\n\n\t\t\tif(B < K - A) {\n\n\t\t\t\tbNum = B;\n\n\t\t\t\tcNum = K - A - B;\n\n\t\t\t}else {\n\n\t\t\t\tbNum = K - A;\n\n\t\t\t}\n\n\t\t}else {\n\n\t\t\taNum = K;\n\n\t\t}\n\n\t\tSystem.out.println(aNum - cNum);\n\n\t}\n\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args ) {
Scanner input = new Scanner(System.in);
int A = input.nextInt();
int B = input.nextInt();
int C = input.nextInt();
int K = input.nextInt();
input.close();
int aNum = 0;
int bNum = 0;
int cNum = 0;
if(A < K ) {
aNum = A;
if(B < K - A) {
bNum = B;
cNum = K - A - B;
}else {
bNum = K - A;
}
}else {
aNum = K;
}
System.out.println(aNum - cNum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
13,
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
],
[
78,
5
],
[
78,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
53,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
53,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
6,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint max = 0;\n\n\t\tif (k <= a) {\n\t\t\tmax = k;\n\t\t} else if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}\n\n//\t\tif (0 < max) {\n\t\t\tSystem.out.print(max);\n//\t\t} else {\n//\t\t\tSystem.out.print(0);\n//\t\t}\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint max = 0;\n\n\t\tif (k <= a) {\n\t\t\tmax = k;\n\t\t} else if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}\n\n//\t\tif (0 < max) {\n\t\t\tSystem.out.print(max);\n//\t\t} else {\n//\t\t\tSystem.out.print(0);\n//\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint max = 0;\n\n\t\tif (k <= a) {\n\t\t\tmax = k;\n\t\t} else if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}\n\n//\t\tif (0 < max) {\n\t\t\tSystem.out.print(max);\n//\t\t} else {\n//\t\t\tSystem.out.print(0);\n//\t\t}\n\n\t}",
"main",
"{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint max = 0;\n\n\t\tif (k <= a) {\n\t\t\tmax = k;\n\t\t} else if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}\n\n//\t\tif (0 < max) {\n\t\t\tSystem.out.print(max);\n//\t\t} else {\n//\t\t\tSystem.out.print(0);\n//\t\t}\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 b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int c = scan.nextInt();",
"c",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int k = scan.nextInt();",
"k",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int max = 0;",
"max",
"0",
"if (k <= a) {\n\t\t\tmax = k;\n\t\t} else if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}",
"k <= a",
"k",
"a",
"{\n\t\t\tmax = k;\n\t\t}",
"max = k",
"max",
"k",
"if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}",
"k <= (a + b)",
"k",
"(a + b)",
"a",
"b",
"{\n\t\t\tmax = a;\n\t\t}",
"max = a",
"max",
"a",
"{\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}",
"k = k - a",
"k",
"k - a",
"k",
"a",
"k = k - b",
"k",
"k - b",
"k",
"b",
"max = a - k",
"max",
"a - k",
"a",
"k",
"System.out.print(max)",
"System.out.print",
"System.out",
"System",
"System.out",
"max",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint max = 0;\n\n\t\tif (k <= a) {\n\t\t\tmax = k;\n\t\t} else if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}\n\n//\t\tif (0 < max) {\n\t\t\tSystem.out.print(max);\n//\t\t} else {\n//\t\t\tSystem.out.print(0);\n//\t\t}\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint c = scan.nextInt();\n\t\tint k = scan.nextInt();\n\t\tint max = 0;\n\n\t\tif (k <= a) {\n\t\t\tmax = k;\n\t\t} else if (k <= (a + b)) {\n\t\t\tmax = a;\n\t\t} else {\n//\t\t\tmax = a - (k - a - b);\n\t\t\tk = k - a;\n\t\t\tk = k - b;\n\t\t\tmax = a - k;\n\t\t}\n\n//\t\tif (0 < max) {\n\t\t\tSystem.out.print(max);\n//\t\t} else {\n//\t\t\tSystem.out.print(0);\n//\t\t}\n\n\t}\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 b = scan.nextInt();
int c = scan.nextInt();
int k = scan.nextInt();
int max = 0;
if (k <= a) {
max = k;
} else if (k <= (a + b)) {
max = a;
} else {
// max = a - (k - a - b);
k = k - a;
k = k - b;
max = a - k;
}
// if (0 < max) {
System.out.print(max);
// } else {
// System.out.print(0);
// }
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
14,
2,
2,
13,
13,
17,
30,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
43,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
] |
[
"import java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t\t//最大値\n \n\t\tif(K<=A){\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}else{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t\t//最大値\n \n\t\tif(K<=A){\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}else{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t\t//最大値\n \n\t\tif(K<=A){\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}else{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t\t//最大値\n \n\t\tif(K<=A){\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}else{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int A = in.nextInt();",
"A",
"in.nextInt()",
"in.nextInt",
"in",
"int B = in.nextInt();",
"B",
"in.nextInt()",
"in.nextInt",
"in",
"int C = in.nextInt();",
"C",
"in.nextInt()",
"in.nextInt",
"in",
"int K = in.nextInt();",
"K",
"in.nextInt()",
"in.nextInt",
"in",
"int max = 0;",
"max",
"0",
"if(K<=A){\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}else{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"K<=A",
"K",
"A",
"{\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}",
"max += K",
"max",
"K",
"{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"max += A",
"max",
"A",
"K-=A",
"K",
"A",
"if((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}",
"(K-B) >= 0",
"(K-B)",
"K",
"B",
"0",
"{\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}",
"K-=B",
"K",
"B",
"if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}",
"K > 0",
"K",
"0",
"{\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}",
"max -= K",
"max",
"K",
"System.out.println(max)",
"System.out.println",
"System.out",
"System",
"System.out",
"max",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t\t//最大値\n \n\t\tif(K<=A){\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}else{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint A = in.nextInt();\t//1が書かれたカードの枚数\n\t\tint B = in.nextInt();\t//0が書かれたカードの枚数\n\t\tint C = in.nextInt();\t//-1が書かれたカードの枚数\n\t\tint K = in.nextInt();\t//取る枚数\n\t\tint max = 0;\t\t\t//最大値\n \n\t\tif(K<=A){\t\t\t//取る枚数がA以下ならば\n\t\t\tmax += K;\n\t\t}else{\n \tmax += A;\n\t\t\tK-=A;\n \tif((K-B) >= 0){\t\t\t//取る枚数がB以上ならば\n\t\t\t\tK-=B;\n if(K > 0){\t\t\t\t//取る枚数が1以上ならば\n\t\t\t\t\tmax -= K;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(max);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int A = in.nextInt(); //1が書かれたカードの枚数
int B = in.nextInt(); //0が書かれたカードの枚数
int C = in.nextInt(); //-1が書かれたカードの枚数
int K = in.nextInt(); //取る枚数
int max = 0; //最大値
if(K<=A){ //取る枚数がA以下ならば
max += K;
}else{
max += A;
K-=A;
if((K-B) >= 0){ //取る枚数がB以上ならば
K-=B;
if(K > 0){ //取る枚数が1以上ならば
max -= K;
}
}
}
System.out.println(max);
}
}
|
[
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,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
30,
41,
13,
4,
18,
13,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
41,
13,
4,
18,
13,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
41,
13,
4,
18,
13,
13,
13,
0,
13,
13,
0,
13,
13,
4,
18,
13,
4,
18,
13,
13,
23,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
144,
17
],
[
144,
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
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
144,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
55,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
55,
76
],
[
76,
77
],
[
76,
78
],
[
55,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
83,
91
],
[
91,
92
],
[
91,
93
],
[
83,
94
],
[
94,
95
],
[
94,
96
],
[
55,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
104,
108
],
[
101,
109
],
[
109,
110
],
[
109,
111
],
[
55,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
119,
123
],
[
116,
124
],
[
124,
125
],
[
124,
126
],
[
116,
127
],
[
127,
128
],
[
127,
129
],
[
55,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
53,
137
],
[
137,
138
],
[
53,
139
],
[
139,
140
],
[
53,
141
],
[
141,
142
],
[
0,
143
],
[
143,
144
],
[
143,
145
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\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 Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n EasyLinearProgramming solver = new EasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class EasyLinearProgramming {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n\n int result = 0;\n if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }\n if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }\n if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }\n out.append(String.valueOf(result));\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.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n EasyLinearProgramming solver = new EasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class EasyLinearProgramming {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n\n int result = 0;\n if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }\n if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }\n if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }\n out.append(String.valueOf(result));\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n EasyLinearProgramming solver = new EasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n EasyLinearProgramming solver = new EasyLinearProgramming();\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",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"EasyLinearProgramming solver = new EasyLinearProgramming();",
"solver",
"new EasyLinearProgramming()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class EasyLinearProgramming {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n\n int result = 0;\n if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }\n if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }\n if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }\n out.append(String.valueOf(result));\n }\n\n }",
"EasyLinearProgramming",
"public void solve(int testNumber, Scanner in, PrintWriter out) {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n\n int result = 0;\n if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }\n if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }\n if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }\n out.append(String.valueOf(result));\n }",
"solve",
"{\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n\n int result = 0;\n if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }\n if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }\n if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }\n out.append(String.valueOf(result));\n }",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"int b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"int c = in.nextInt();",
"c",
"in.nextInt()",
"in.nextInt",
"in",
"int k = in.nextInt();",
"k",
"in.nextInt()",
"in.nextInt",
"in",
"int result = 0;",
"result",
"0",
"if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }",
"a > 0",
"a",
"0",
"{\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }",
"int min = Math.min(a, k);",
"min",
"Math.min(a, k)",
"Math.min",
"Math",
"a",
"k",
"k -= min",
"k",
"min",
"result += min",
"result",
"min",
"if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }",
"b > 0",
"b",
"0",
"{\n int min = Math.min(b, k);\n k -= min;\n }",
"int min = Math.min(b, k);",
"min",
"Math.min(b, k)",
"Math.min",
"Math",
"b",
"k",
"k -= min",
"k",
"min",
"if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }",
"c > 0",
"c",
"0",
"{\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }",
"int min = Math.min(c, k);",
"min",
"Math.min(c, k)",
"Math.min",
"Math",
"c",
"k",
"k -= min",
"k",
"min",
"result -= min",
"result",
"min",
"out.append(String.valueOf(result))",
"out.append",
"out",
"String.valueOf(result)",
"String.valueOf",
"String",
"result",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n EasyLinearProgramming solver = new EasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class EasyLinearProgramming {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n\n int result = 0;\n if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }\n if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }\n if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }\n out.append(String.valueOf(result));\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 Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n EasyLinearProgramming solver = new EasyLinearProgramming();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class EasyLinearProgramming {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int a = in.nextInt();\n int b = in.nextInt();\n int c = in.nextInt();\n int k = in.nextInt();\n\n int result = 0;\n if (a > 0) {\n int min = Math.min(a, k);\n k -= min;\n result += min;\n }\n if (b > 0) {\n int min = Math.min(b, k);\n k -= min;\n }\n if (c > 0) {\n int min = Math.min(c, k);\n k -= min;\n result -= min;\n }\n out.append(String.valueOf(result));\n }\n\n }\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* 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;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
EasyLinearProgramming solver = new EasyLinearProgramming();
solver.solve(1, in, out);
out.close();
}
static class EasyLinearProgramming {
public void solve(int testNumber, Scanner in, PrintWriter out) {
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
int k = in.nextInt();
int result = 0;
if (a > 0) {
int min = Math.min(a, k);
k -= min;
result += min;
}
if (b > 0) {
int min = Math.min(b, k);
k -= min;
}
if (c > 0) {
int min = Math.min(c, k);
k -= min;
result -= min;
}
out.append(String.valueOf(result));
}
}
}
|
[
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,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
13,
4,
18,
13,
17,
2,
2,
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
],
[
84,
11
],
[
84,
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
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
14,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
34,
36
],
[
14,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
42,
44
],
[
14,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
50,
52
],
[
14,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
58,
60
],
[
14,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
12,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString[] work = line1.split(\" \");\n\t\tint a = Integer.parseInt(work[0]);\n\t\tint b = Integer.parseInt(work[1]);\n\t\tint c = Integer.parseInt(work[2]);\n\t\tint k = Integer.parseInt(work[3]);\n\t\tSystem.out.println(Math.min(a, k) - Math.max(0, (k - a - b)));\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) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString[] work = line1.split(\" \");\n\t\tint a = Integer.parseInt(work[0]);\n\t\tint b = Integer.parseInt(work[1]);\n\t\tint c = Integer.parseInt(work[2]);\n\t\tint k = Integer.parseInt(work[3]);\n\t\tSystem.out.println(Math.min(a, k) - Math.max(0, (k - a - b)));\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString[] work = line1.split(\" \");\n\t\tint a = Integer.parseInt(work[0]);\n\t\tint b = Integer.parseInt(work[1]);\n\t\tint c = Integer.parseInt(work[2]);\n\t\tint k = Integer.parseInt(work[3]);\n\t\tSystem.out.println(Math.min(a, k) - Math.max(0, (k - a - b)));\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString[] work = line1.split(\" \");\n\t\tint a = Integer.parseInt(work[0]);\n\t\tint b = Integer.parseInt(work[1]);\n\t\tint c = Integer.parseInt(work[2]);\n\t\tint k = Integer.parseInt(work[3]);\n\t\tSystem.out.println(Math.min(a, k) - Math.max(0, (k - a - b)));\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line1 = br.readLine();",
"line1",
"br.readLine()",
"br.readLine",
"br",
"String[] work = line1.split(\" \");",
"work",
"line1.split(\" \")",
"line1.split",
"line1",
"\" \"",
"int a = Integer.parseInt(work[0]);",
"a",
"Integer.parseInt(work[0])",
"Integer.parseInt",
"Integer",
"work[0]",
"work",
"0",
"int b = Integer.parseInt(work[1]);",
"b",
"Integer.parseInt(work[1])",
"Integer.parseInt",
"Integer",
"work[1]",
"work",
"1",
"int c = Integer.parseInt(work[2]);",
"c",
"Integer.parseInt(work[2])",
"Integer.parseInt",
"Integer",
"work[2]",
"work",
"2",
"int k = Integer.parseInt(work[3]);",
"k",
"Integer.parseInt(work[3])",
"Integer.parseInt",
"Integer",
"work[3]",
"work",
"3",
"System.out.println(Math.min(a, k) - Math.max(0, (k - a - b)))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.min(a, k) - Math.max(0, (k - a - b))",
"Math.min(a, k)",
"Math.min",
"Math",
"a",
"k",
"Math.max(0, (k - a - b))",
"Math.max",
"Math",
"0",
"(k - a - b)",
"k - a - b",
"k",
"a",
"b",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString[] work = line1.split(\" \");\n\t\tint a = Integer.parseInt(work[0]);\n\t\tint b = Integer.parseInt(work[1]);\n\t\tint c = Integer.parseInt(work[2]);\n\t\tint k = Integer.parseInt(work[3]);\n\t\tSystem.out.println(Math.min(a, k) - Math.max(0, (k - a - b)));\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString[] work = line1.split(\" \");\n\t\tint a = Integer.parseInt(work[0]);\n\t\tint b = Integer.parseInt(work[1]);\n\t\tint c = Integer.parseInt(work[2]);\n\t\tint k = Integer.parseInt(work[3]);\n\t\tSystem.out.println(Math.min(a, k) - Math.max(0, (k - a - b)));\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) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line1 = br.readLine();
String[] work = line1.split(" ");
int a = Integer.parseInt(work[0]);
int b = Integer.parseInt(work[1]);
int c = Integer.parseInt(work[2]);
int k = Integer.parseInt(work[3]);
System.out.println(Math.min(a, k) - Math.max(0, (k - a - b)));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
2,
13,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
65,
5
],
[
65,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
44,
48
],
[
32,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
6,
62
],
[
62,
63
],
[
0,
64
],
[
64,
65
],
[
64,
66
]
] |
[
"\nimport java.util.*;\n\npublic class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n long a =sc.nextLong();\n long b =sc.nextLong();\n long c =sc.nextLong();\n long k =sc.nextLong();\n \n \n if(k <= a+b ) {\n \t System.out.println(Math.min(a, k));\n }else {\n \t System.out.println(a - (k-a-b));\n }\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n long a =sc.nextLong();\n long b =sc.nextLong();\n long c =sc.nextLong();\n long k =sc.nextLong();\n \n \n if(k <= a+b ) {\n \t System.out.println(Math.min(a, k));\n }else {\n \t System.out.println(a - (k-a-b));\n }\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n long a =sc.nextLong();\n long b =sc.nextLong();\n long c =sc.nextLong();\n long k =sc.nextLong();\n \n \n if(k <= a+b ) {\n \t System.out.println(Math.min(a, k));\n }else {\n \t System.out.println(a - (k-a-b));\n }\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n long a =sc.nextLong();\n long b =sc.nextLong();\n long c =sc.nextLong();\n long k =sc.nextLong();\n \n \n if(k <= a+b ) {\n \t System.out.println(Math.min(a, k));\n }else {\n \t System.out.println(a - (k-a-b));\n }\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long a =sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b =sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long c =sc.nextLong();",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long k =sc.nextLong();",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"if(k <= a+b ) {\n \t System.out.println(Math.min(a, k));\n }else {\n \t System.out.println(a - (k-a-b));\n }",
"k <= a+b",
"k",
"a+b",
"a",
"b",
"{\n \t System.out.println(Math.min(a, k));\n }",
"System.out.println(Math.min(a, k))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.min(a, k)",
"Math.min",
"Math",
"a",
"k",
"{\n \t System.out.println(a - (k-a-b));\n }",
"System.out.println(a - (k-a-b))",
"System.out.println",
"System.out",
"System",
"System.out",
"a - (k-a-b)",
"a",
"(k-a-b)",
"k-a-b",
"k",
"a",
"b",
"String[] args",
"args",
"public class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n long a =sc.nextLong();\n long b =sc.nextLong();\n long c =sc.nextLong();\n long k =sc.nextLong();\n \n \n if(k <= a+b ) {\n \t System.out.println(Math.min(a, k));\n }else {\n \t System.out.println(a - (k-a-b));\n }\n\t}\n}",
"public class Main {// Main\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n long a =sc.nextLong();\n long b =sc.nextLong();\n long c =sc.nextLong();\n long k =sc.nextLong();\n \n \n if(k <= a+b ) {\n \t System.out.println(Math.min(a, k));\n }else {\n \t System.out.println(a - (k-a-b));\n }\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {// Main
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
long a =sc.nextLong();
long b =sc.nextLong();
long c =sc.nextLong();
long k =sc.nextLong();
if(k <= a+b ) {
System.out.println(Math.min(a, k));
}else {
System.out.println(a - (k-a-b));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
2,
2,
13,
13,
13,
30,
14,
2,
13,
13,
0,
13,
13,
0,
13,
2,
13,
17,
14,
2,
2,
13,
13,
17,
30,
0,
13,
2,
17,
2,
13,
13,
14,
2,
2,
2,
13,
13,
13,
17,
30,
0,
13,
2,
40,
17,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
39,
39
],
[
39,
40
],
[
39,
41
],
[
39,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
44,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
43,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
73,
73
],
[
73,
74
],
[
73,
75
],
[
73,
76
],
[
71,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] |
[
"import java.util.Scanner;\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint A =scan.nextInt();\n\t\tint B =scan.nextInt();\n\t\tint C =scan.nextInt();\n\t\tint K=scan.nextInt();\n\t\tint result=0;\n\t\tif(K<=A+B+C) {\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t\t\n\t}\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 scan =new Scanner(System.in);\n\t\tint A =scan.nextInt();\n\t\tint B =scan.nextInt();\n\t\tint C =scan.nextInt();\n\t\tint K=scan.nextInt();\n\t\tint result=0;\n\t\tif(K<=A+B+C) {\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint A =scan.nextInt();\n\t\tint B =scan.nextInt();\n\t\tint C =scan.nextInt();\n\t\tint K=scan.nextInt();\n\t\tint result=0;\n\t\tif(K<=A+B+C) {\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t\t\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint A =scan.nextInt();\n\t\tint B =scan.nextInt();\n\t\tint C =scan.nextInt();\n\t\tint K=scan.nextInt();\n\t\tint result=0;\n\t\tif(K<=A+B+C) {\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t\t\n\t}",
"Scanner scan =new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int A =scan.nextInt();",
"A",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int B =scan.nextInt();",
"B",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int C =scan.nextInt();",
"C",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int K=scan.nextInt();",
"K",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int result=0;",
"result",
"0",
"if(K<=A+B+C) {\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"K<=A+B+C",
"K",
"A+B+C",
"A+B+C",
"A",
"B",
"C",
"{\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"if(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;",
"A>K",
"A",
"K",
"result=K",
"result",
"K",
"result=A*1",
"result",
"A*1",
"A",
"1",
"if(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}",
"K-A>0",
"K-A",
"K",
"A",
"0",
"{\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}",
"result+=0*(K-A)",
"result",
"0*(K-A)",
"0",
"(K-A)",
"K",
"A",
"if(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}",
"K-A-B>0",
"K-A-B",
"K-A-B",
"K",
"A",
"B",
"0",
"{\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}",
"result+=-1*(K-A-B)",
"result",
"-1*(K-A-B)",
"-1",
"1",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"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 scan =new Scanner(System.in);\n\t\tint A =scan.nextInt();\n\t\tint B =scan.nextInt();\n\t\tint C =scan.nextInt();\n\t\tint K=scan.nextInt();\n\t\tint result=0;\n\t\tif(K<=A+B+C) {\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t\t\n\t}\n}",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan =new Scanner(System.in);\n\t\tint A =scan.nextInt();\n\t\tint B =scan.nextInt();\n\t\tint C =scan.nextInt();\n\t\tint K=scan.nextInt();\n\t\tint result=0;\n\t\tif(K<=A+B+C) {\n\t\t\tif(A>K)\n\t\t\t\tresult=K;\n\t\t\telse \n\t\t\tresult=A*1;\n\t\t\tif(K-A>0) {\n\t\t\t\tresult+=0*(K-A);\n\t\t\t\tif(K-A-B>0) {\n\t\t\t\t\tresult+=-1*(K-A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t\t\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan =new Scanner(System.in);
int A =scan.nextInt();
int B =scan.nextInt();
int C =scan.nextInt();
int K=scan.nextInt();
int result=0;
if(K<=A+B+C) {
if(A>K)
result=K;
else
result=A*1;
if(K-A>0) {
result+=0*(K-A);
if(K-A-B>0) {
result+=-1*(K-A-B);
}
}
}
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
4,
18,
13,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
13,
29,
0,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
13,
29,
41,
13,
4,
18,
13,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
55,
62
],
[
8,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
70,
77
],
[
8,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
80,
84
],
[
8,
85
],
[
85,
86
],
[
85,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
6,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt() , k = sc.nextInt();\n String s = \"a\";\n int result = 0;\n \n int minA = Math.min(a, k);\n result += minA;\n \n k -= minA;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n \n k -= b;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n\n int minC = Math.min(c, k);\n result -= minC;\n\n System.out.println(result);\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(), b = sc.nextInt(), c = sc.nextInt() , k = sc.nextInt();\n String s = \"a\";\n int result = 0;\n \n int minA = Math.min(a, k);\n result += minA;\n \n k -= minA;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n \n k -= b;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n\n int minC = Math.min(c, k);\n result -= minC;\n\n System.out.println(result);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt() , k = sc.nextInt();\n String s = \"a\";\n int result = 0;\n \n int minA = Math.min(a, k);\n result += minA;\n \n k -= minA;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n \n k -= b;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n\n int minC = Math.min(c, k);\n result -= minC;\n\n System.out.println(result);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt() , k = sc.nextInt();\n String s = \"a\";\n int result = 0;\n \n int minA = Math.min(a, k);\n result += minA;\n \n k -= minA;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n \n k -= b;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n\n int minC = Math.min(c, k);\n result -= minC;\n\n System.out.println(result);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c = sc.nextInt()",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String s = \"a\";",
"s",
"\"a\"",
"int result = 0;",
"result",
"0",
"int minA = Math.min(a, k);",
"minA",
"Math.min(a, k)",
"Math.min",
"Math",
"a",
"k",
"result += minA",
"result",
"minA",
"k -= minA",
"k",
"minA",
"if (k < 0) {\n System.out.println(result);\n return;\n }",
"k < 0",
"k",
"0",
"{\n System.out.println(result);\n return;\n }",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"return;",
"k -= b",
"k",
"b",
"if (k < 0) {\n System.out.println(result);\n return;\n }",
"k < 0",
"k",
"0",
"{\n System.out.println(result);\n return;\n }",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"return;",
"int minC = Math.min(c, k);",
"minC",
"Math.min(c, k)",
"Math.min",
"Math",
"c",
"k",
"result -= minC",
"result",
"minC",
"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 Scanner sc = new Scanner(System.in);\n int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt() , k = sc.nextInt();\n String s = \"a\";\n int result = 0;\n \n int minA = Math.min(a, k);\n result += minA;\n \n k -= minA;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n \n k -= b;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n\n int minC = Math.min(c, k);\n result -= minC;\n\n System.out.println(result);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt() , k = sc.nextInt();\n String s = \"a\";\n int result = 0;\n \n int minA = Math.min(a, k);\n result += minA;\n \n k -= minA;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n \n k -= b;\n if (k < 0) {\n System.out.println(result);\n return;\n }\n\n int minC = Math.min(c, k);\n result -= minC;\n\n System.out.println(result);\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(), b = sc.nextInt(), c = sc.nextInt() , k = sc.nextInt();
String s = "a";
int result = 0;
int minA = Math.min(a, k);
result += minA;
k -= minA;
if (k < 0) {
System.out.println(result);
return;
}
k -= b;
if (k < 0) {
System.out.println(result);
return;
}
int minC = Math.min(c, k);
result -= minC;
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
13,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
43,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n \n if(A>=K){\n System.out.println(K);\n }else if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }\n\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n \n if(A>=K){\n System.out.println(K);\n }else if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }\n\n }\n}",
"Main",
"public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n \n if(A>=K){\n System.out.println(K);\n }else if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }\n\n }",
"main",
"{\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n \n if(A>=K){\n System.out.println(K);\n }else if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }\n\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int A = scanner.nextInt();",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int B = scanner.nextInt();",
"B",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int C = scanner.nextInt();",
"C",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int K = scanner.nextInt();",
"K",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if(A>=K){\n System.out.println(K);\n }else if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }",
"A>=K",
"A",
"K",
"{\n System.out.println(K);\n }",
"System.out.println(K)",
"System.out.println",
"System.out",
"System",
"System.out",
"K",
"if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }",
"A<K && A+B>=K",
"A<K",
"A",
"K",
"A+B>=K",
"A+B",
"A",
"B",
"K",
"{\n System.out.println(A);\n }",
"System.out.println(A)",
"System.out.println",
"System.out",
"System",
"System.out",
"A",
"if(A+B<K){\n System.out.println(A-(K-A-B));\n }",
"A+B<K",
"A+B",
"A",
"B",
"K",
"{\n System.out.println(A-(K-A-B));\n }",
"System.out.println(A-(K-A-B))",
"System.out.println",
"System.out",
"System",
"System.out",
"A-(K-A-B)",
"A",
"(K-A-B)",
"K-A-B",
"K",
"A",
"B",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n \n if(A>=K){\n System.out.println(K);\n }else if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int C = scanner.nextInt();\n int K = scanner.nextInt();\n \n if(A>=K){\n System.out.println(K);\n }else if(A<K && A+B>=K){\n System.out.println(A);\n }else if(A+B<K){\n System.out.println(A-(K-A-B));\n }\n\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int A = scanner.nextInt();
int B = scanner.nextInt();
int C = scanner.nextInt();
int K = scanner.nextInt();
if(A>=K){
System.out.println(K);
}else if(A<K && A+B>=K){
System.out.println(A);
}else if(A+B<K){
System.out.println(A-(K-A-B));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
29,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
29,
14,
2,
13,
13,
30,
0,
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
],
[
104,
5
],
[
104,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
35,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
48,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
48,
61
],
[
8,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
72,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
6,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n if (k >= a){\n ans += a;\n k = k - a;\n }else{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= b){\n k = k - b;\n }else{\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= c){\n ans -= c; \n }else{\n ans -= k;\n }\n\n System.out.println(ans);\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 Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n if (k >= a){\n ans += a;\n k = k - a;\n }else{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= b){\n k = k - b;\n }else{\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= c){\n ans -= c; \n }else{\n ans -= k;\n }\n\n System.out.println(ans);\n\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n if (k >= a){\n ans += a;\n k = k - a;\n }else{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= b){\n k = k - b;\n }else{\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= c){\n ans -= c; \n }else{\n ans -= k;\n }\n\n System.out.println(ans);\n\n }",
"main",
"{\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n if (k >= a){\n ans += a;\n k = k - a;\n }else{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= b){\n k = k - b;\n }else{\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= c){\n ans -= c; \n }else{\n ans -= k;\n }\n\n System.out.println(ans);\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 = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k = sc.nextInt();",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"if (k >= a){\n ans += a;\n k = k - a;\n }else{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }",
"k >= a",
"k",
"a",
"{\n ans += a;\n k = k - a;\n }",
"ans += a",
"ans",
"a",
"k = k - a",
"k",
"k - a",
"k",
"a",
"{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }",
"ans += k",
"ans",
"k",
"k = 0",
"k",
"0",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return;",
"if (k >= b){\n k = k - b;\n }else{\n k = 0;\n System.out.println(ans);\n return;\n }",
"k >= b",
"k",
"b",
"{\n k = k - b;\n }",
"k = k - b",
"k",
"k - b",
"k",
"b",
"{\n k = 0;\n System.out.println(ans);\n return;\n }",
"k = 0",
"k",
"0",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"return;",
"if (k >= c){\n ans -= c; \n }else{\n ans -= k;\n }",
"k >= c",
"k",
"c",
"{\n ans -= c; \n }",
"ans -= c",
"ans",
"c",
"{\n ans -= k;\n }",
"ans -= k",
"ans",
"k",
"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) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n if (k >= a){\n ans += a;\n k = k - a;\n }else{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= b){\n k = k - b;\n }else{\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= c){\n ans -= c; \n }else{\n ans -= k;\n }\n\n System.out.println(ans);\n\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int c = sc.nextInt();\n int k = sc.nextInt();\n \n int ans = 0;\n if (k >= a){\n ans += a;\n k = k - a;\n }else{\n ans += k;\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= b){\n k = k - b;\n }else{\n k = 0;\n System.out.println(ans);\n return;\n }\n \n if (k >= c){\n ans -= c; \n }else{\n ans -= k;\n }\n\n System.out.println(ans);\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 = sc.nextInt();
int c = sc.nextInt();
int k = sc.nextInt();
int ans = 0;
if (k >= a){
ans += a;
k = k - a;
}else{
ans += k;
k = 0;
System.out.println(ans);
return;
}
if (k >= b){
k = k - b;
}else{
k = 0;
System.out.println(ans);
return;
}
if (k >= c){
ans -= c;
}else{
ans -= k;
}
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,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
17,
14,
2,
13,
17,
3,
0,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
17,
14,
2,
13,
17,
3,
0,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
17,
14,
2,
13,
17,
3,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
128,
5
],
[
128,
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
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
47,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
75,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
8,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
91,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
103,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
103,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
8,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
6,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n /**\n * @param args\n */\n public static void main(String[] args) {\n // TODO 自動生成されたメソッド・スタブ\n Scanner cin = new Scanner(System.in);\n int A = cin.nextInt();\n int B = cin.nextInt();\n int C = cin.nextInt();\n int K = cin.nextInt();\n\n int ans = 0;\n for (int i=0;i<A;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }\n for (int i=0;i<B;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }\n for (int i=0;i<C;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }\n System.out.println(ans);\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n /**\n * @param args\n */\n public static void main(String[] args) {\n // TODO 自動生成されたメソッド・スタブ\n Scanner cin = new Scanner(System.in);\n int A = cin.nextInt();\n int B = cin.nextInt();\n int C = cin.nextInt();\n int K = cin.nextInt();\n\n int ans = 0;\n for (int i=0;i<A;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }\n for (int i=0;i<B;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }\n for (int i=0;i<C;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }\n System.out.println(ans);\n }\n\n}",
"Main",
"/**\n * @param args\n */\n public static void main(String[] args) {\n // TODO 自動生成されたメソッド・スタブ\n Scanner cin = new Scanner(System.in);\n int A = cin.nextInt();\n int B = cin.nextInt();\n int C = cin.nextInt();\n int K = cin.nextInt();\n\n int ans = 0;\n for (int i=0;i<A;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }\n for (int i=0;i<B;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }\n for (int i=0;i<C;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }\n System.out.println(ans);\n }",
"main",
"{\n // TODO 自動生成されたメソッド・スタブ\n Scanner cin = new Scanner(System.in);\n int A = cin.nextInt();\n int B = cin.nextInt();\n int C = cin.nextInt();\n int K = cin.nextInt();\n\n int ans = 0;\n for (int i=0;i<A;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }\n for (int i=0;i<B;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }\n for (int i=0;i<C;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }\n System.out.println(ans);\n }",
"Scanner cin = new Scanner(System.in);",
"cin",
"new Scanner(System.in)",
"int A = cin.nextInt();",
"A",
"cin.nextInt()",
"cin.nextInt",
"cin",
"int B = cin.nextInt();",
"B",
"cin.nextInt()",
"cin.nextInt",
"cin",
"int C = cin.nextInt();",
"C",
"cin.nextInt()",
"cin.nextInt",
"cin",
"int K = cin.nextInt();",
"K",
"cin.nextInt()",
"cin.nextInt",
"cin",
"int ans = 0;",
"ans",
"0",
"for (int i=0;i<A;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<A",
"i",
"A",
"i++",
"i++",
"i",
"{\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }",
"{\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }",
"K = K - 1",
"K",
"K - 1",
"K",
"1",
"if (K < 0) break;",
"K < 0",
"K",
"0",
"break;",
"ans = ans + 1",
"ans",
"ans + 1",
"ans",
"1",
"for (int i=0;i<B;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<B",
"i",
"B",
"i++",
"i++",
"i",
"{\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }",
"{\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }",
"K = K - 1",
"K",
"K - 1",
"K",
"1",
"if (K < 0) break;",
"K < 0",
"K",
"0",
"break;",
"ans = ans + 0",
"ans",
"ans + 0",
"ans",
"0",
"for (int i=0;i<C;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<C",
"i",
"C",
"i++",
"i++",
"i",
"{\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }",
"{\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }",
"K = K - 1",
"K",
"K - 1",
"K",
"1",
"if (K < 0) break;",
"K < 0",
"K",
"0",
"break;",
"ans = ans - 1",
"ans",
"ans - 1",
"ans",
"1",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n /**\n * @param args\n */\n public static void main(String[] args) {\n // TODO 自動生成されたメソッド・スタブ\n Scanner cin = new Scanner(System.in);\n int A = cin.nextInt();\n int B = cin.nextInt();\n int C = cin.nextInt();\n int K = cin.nextInt();\n\n int ans = 0;\n for (int i=0;i<A;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }\n for (int i=0;i<B;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }\n for (int i=0;i<C;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }\n System.out.println(ans);\n }\n\n}",
"public class Main {\n\n /**\n * @param args\n */\n public static void main(String[] args) {\n // TODO 自動生成されたメソッド・スタブ\n Scanner cin = new Scanner(System.in);\n int A = cin.nextInt();\n int B = cin.nextInt();\n int C = cin.nextInt();\n int K = cin.nextInt();\n\n int ans = 0;\n for (int i=0;i<A;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 1;\n }\n for (int i=0;i<B;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans + 0;\n }\n for (int i=0;i<C;i++){\n K = K - 1;\n if (K < 0) break;\n ans = ans - 1;\n }\n System.out.println(ans);\n }\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner cin = new Scanner(System.in);
int A = cin.nextInt();
int B = cin.nextInt();
int C = cin.nextInt();
int K = cin.nextInt();
int ans = 0;
for (int i=0;i<A;i++){
K = K - 1;
if (K < 0) break;
ans = ans + 1;
}
for (int i=0;i<B;i++){
K = K - 1;
if (K < 0) break;
ans = ans + 0;
}
for (int i=0;i<C;i++){
K = K - 1;
if (K < 0) break;
ans = ans - 1;
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
4,
13,
12,
13,
30,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
17,
14,
2,
2,
13,
13,
2,
13,
17,
30,
0,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
110,
8
],
[
8,
9
],
[
110,
10
],
[
10,
11
],
[
110,
12
],
[
12,
13
],
[
110,
14
],
[
14,
15
],
[
110,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
16,
25
],
[
25,
26
],
[
110,
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
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
29,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
29,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
29,
53
],
[
53,
54
],
[
54,
55
],
[
29,
56
],
[
56,
57
],
[
110,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
69,
71
],
[
61,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
60,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
79,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
60,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
60,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n long a;\n long b;\n long c;\n long k;\n long ans;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextLong();\n b = sc.nextLong();\n c = sc.nextLong();\n k = sc.nextLong();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n if (a < k) {\n ans = a;\n k -= a; \n } else {\n ans = k;\n k = 0;\n }\n if (b < k && k > 0) {\n k -= b;\n } else {\n k = 0;\n }\n if (k > 0) {\n ans -= k;\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n long a;\n long b;\n long c;\n long k;\n long ans;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextLong();\n b = sc.nextLong();\n c = sc.nextLong();\n k = sc.nextLong();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n if (a < k) {\n ans = a;\n k -= a; \n } else {\n ans = k;\n k = 0;\n }\n if (b < k && k > 0) {\n k -= b;\n } else {\n k = 0;\n }\n if (k > 0) {\n ans -= k;\n }\n System.out.println(ans);\n }\n}",
"Main",
"// 変数一覧\n long a;",
"a",
"long b;",
"b",
"long c;",
"c",
"long k;",
"k",
"long ans;",
"ans",
"public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }",
"main",
"{\n Main main = new Main();\n main.run();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.run()",
"main.run",
"main",
"String[] args",
"args",
"public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextLong();\n b = sc.nextLong();\n c = sc.nextLong();\n k = sc.nextLong();\n sc.close();\n\n // 解答処理\n solve();\n }",
"run",
"{\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextLong();\n b = sc.nextLong();\n c = sc.nextLong();\n k = sc.nextLong();\n sc.close();\n\n // 解答処理\n solve();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"a = sc.nextLong()",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"b = sc.nextLong()",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"c = sc.nextLong()",
"c",
"sc.nextLong()",
"sc.nextLong",
"sc",
"k = sc.nextLong()",
"k",
"sc.nextLong()",
"sc.nextLong",
"sc",
"sc.close()",
"sc.close",
"sc",
"solve()",
"solve",
"private void solve() {\n if (a < k) {\n ans = a;\n k -= a; \n } else {\n ans = k;\n k = 0;\n }\n if (b < k && k > 0) {\n k -= b;\n } else {\n k = 0;\n }\n if (k > 0) {\n ans -= k;\n }\n System.out.println(ans);\n }",
"solve",
"{\n if (a < k) {\n ans = a;\n k -= a; \n } else {\n ans = k;\n k = 0;\n }\n if (b < k && k > 0) {\n k -= b;\n } else {\n k = 0;\n }\n if (k > 0) {\n ans -= k;\n }\n System.out.println(ans);\n }",
"if (a < k) {\n ans = a;\n k -= a; \n } else {\n ans = k;\n k = 0;\n }",
"a < k",
"a",
"k",
"{\n ans = a;\n k -= a; \n }",
"ans = a",
"ans",
"a",
"k -= a",
"k",
"a",
"{\n ans = k;\n k = 0;\n }",
"ans = k",
"ans",
"k",
"k = 0",
"k",
"0",
"if (b < k && k > 0) {\n k -= b;\n } else {\n k = 0;\n }",
"b < k && k > 0",
"b < k",
"b",
"k",
"k > 0",
"k",
"0",
"{\n k -= b;\n }",
"k -= b",
"k",
"b",
"{\n k = 0;\n }",
"k = 0",
"k",
"0",
"if (k > 0) {\n ans -= k;\n }",
"k > 0",
"k",
"0",
"{\n ans -= k;\n }",
"ans -= k",
"ans",
"k",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n long a;\n long b;\n long c;\n long k;\n long ans;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextLong();\n b = sc.nextLong();\n c = sc.nextLong();\n k = sc.nextLong();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n if (a < k) {\n ans = a;\n k -= a; \n } else {\n ans = k;\n k = 0;\n }\n if (b < k && k > 0) {\n k -= b;\n } else {\n k = 0;\n }\n if (k > 0) {\n ans -= k;\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n long a;\n long b;\n long c;\n long k;\n long ans;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextLong();\n b = sc.nextLong();\n c = sc.nextLong();\n k = sc.nextLong();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n if (a < k) {\n ans = a;\n k -= a; \n } else {\n ans = k;\n k = 0;\n }\n if (b < k && k > 0) {\n k -= b;\n } else {\n k = 0;\n }\n if (k > 0) {\n ans -= k;\n }\n System.out.println(ans);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.run();
}
// 変数一覧
long a;
long b;
long c;
long k;
long ans;
public void run() {
// 入力情報取得
Scanner sc = new Scanner(System.in);
a = sc.nextLong();
b = sc.nextLong();
c = sc.nextLong();
k = sc.nextLong();
sc.close();
// 解答処理
solve();
}
private void solve() {
if (a < k) {
ans = a;
k -= a;
} else {
ans = k;
k = 0;
}
if (b < k && k > 0) {
k -= b;
} else {
k = 0;
}
if (k > 0) {
ans -= k;
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
67,
5
],
[
67,
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
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
10,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
10,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
36,
40
],
[
10,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
43,
47
],
[
10,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
50,
54
],
[
10,
55
],
[
55,
56
],
[
55,
57
],
[
10,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
6,
64
],
[
64,
65
],
[
0,
66
],
[
66,
67
],
[
66,
68
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t}",
"main",
"{\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t}",
"try (Scanner scanner = new Scanner(System.in)) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}",
"{\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}",
"Scanner scanner = new Scanner(System.in)",
"Scanner scanner = new Scanner(System.in)",
"new Scanner(System.in)",
"@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt()",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"b = scanner.nextInt()",
"b",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"c = scanner.nextInt();",
"c",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int k = scanner.nextInt();",
"k",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int sum = Math.min(k, a);",
"sum",
"Math.min(k, a)",
"Math.min",
"Math",
"k",
"a",
"k -= Math.min(k, a)",
"k",
"Math.min(k, a)",
"Math.min",
"Math",
"k",
"a",
"k -= Math.min(k, b)",
"k",
"Math.min(k, b)",
"Math.min",
"Math",
"k",
"b",
"sum -= k",
"sum",
"k",
"System.out.println(sum)",
"System.out.println",
"System.out",
"System",
"System.out",
"sum",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();\n\t\t\tint k = scanner.nextInt();\n\t\t\tint sum = Math.min(k, a);\n\t\t\tk -= Math.min(k, a);\n\t\t\tk -= Math.min(k, b);\n\t\t\tsum -= k;\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner scanner = new Scanner(System.in)) {
@SuppressWarnings("unused")
int a = scanner.nextInt(), b = scanner.nextInt(), c = scanner.nextInt();
int k = scanner.nextInt();
int sum = Math.min(k, a);
k -= Math.min(k, a);
k -= Math.min(k, b);
sum -= k;
System.out.println(sum);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
2,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
2,
13,
2,
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
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
6,
69
],
[
69,
70
]
] |
[
"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();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int ans = 0;\n if (A >= K) {\n ans = K;\n } else if (A+B >= K){\n ans = A;\n } else {\n ans = A - (K-(A+B));\n }\n System.out.println(ans);\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();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int ans = 0;\n if (A >= K) {\n ans = K;\n } else if (A+B >= K){\n ans = A;\n } else {\n ans = A - (K-(A+B));\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int ans = 0;\n if (A >= K) {\n ans = K;\n } else if (A+B >= K){\n ans = A;\n } else {\n ans = A - (K-(A+B));\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int K = sc.nextInt();\n int ans = 0;\n if (A >= K) {\n ans = K;\n } else if (A+B >= K){\n ans = A;\n } else {\n ans = A - (K-(A+B));\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int C = sc.nextInt();",
"C",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int K = sc.nextInt();",
"K",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans = 0;",
"ans",
"0",
"if (A >= K) {\n ans = K;\n } else if (A+B >= K){\n ans = A;\n } else {\n ans = A - (K-(A+B));\n }",
"A >= K",
"A",
"K",
"{\n ans = K;\n }",
"ans = K",
"ans",
"K",
"if (A+B >= K){\n ans = A;\n } else {\n ans = A - (K-(A+B));\n }",
"A+B >= K",
"A+B",
"A",
"B",
"K",
"{\n ans = A;\n }",
"ans = A",
"ans",
"A",
"{\n ans = A - (K-(A+B));\n }",
"ans = A - (K-(A+B))",
"ans",
"A - (K-(A+B))",
"A",
"(K-(A+B))",
"K",
"(A+B)",
"A",
"B",
"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) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int K = sc.nextInt();
int ans = 0;
if (A >= K) {
ans = K;
} else if (A+B >= K){
ans = A;
} else {
ans = A - (K-(A+B));
}
System.out.println(ans);
}
}
|
[
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,
14,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
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
],
[
54,
11
],
[
54,
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
],
[
54,
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
],
[
37,
40
],
[
36,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
36,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
25,
49
],
[
49,
50
],
[
25,
51
],
[
51,
52
],
[
0,
53
],
[
53,
54
],
[
53,
55
]
] |
[
"\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 String s = scan.next();\n\n if(s.equals(\"ABC\"))\n os.println(\"ARC\");\n else\n os.println(\"ABC\");\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 String s = scan.next();\n\n if(s.equals(\"ABC\"))\n os.println(\"ARC\");\n else\n os.println(\"ABC\");\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 String s = scan.next();\n\n if(s.equals(\"ABC\"))\n os.println(\"ARC\");\n else\n os.println(\"ABC\");\n\n }",
"solve",
"{\n // Your code here!\n Scanner scan = new Scanner(is);\n String s = scan.next();\n\n if(s.equals(\"ABC\"))\n os.println(\"ARC\");\n else\n os.println(\"ABC\");\n\n }",
"Scanner scan = new Scanner(is);",
"scan",
"new Scanner(is)",
"String s = scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"if(s.equals(\"ABC\"))\n os.println(\"ARC\");\n else\n os.println(\"ABC\");",
"s.equals(\"ABC\")",
"s.equals",
"s",
"\"ABC\"",
"os.println(\"ARC\")",
"os.println",
"os",
"\"ARC\"",
"os.println(\"ABC\")",
"os.println",
"os",
"\"ABC\"",
"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 String s = scan.next();\n\n if(s.equals(\"ABC\"))\n os.println(\"ARC\");\n else\n os.println(\"ABC\");\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 String s = scan.next();\n\n if(s.equals(\"ABC\"))\n os.println(\"ARC\");\n else\n os.println(\"ABC\");\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);
String s = scan.next();
if(s.equals("ABC"))
os.println("ARC");
else
os.println("ABC");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
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
],
[
18,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
17,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
6,
34
],
[
34,
35
],
[
0,
36
],
[
36,
37
],
[
36,
38
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n String str = s.next();\n\n if (str.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\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 String str = s.next();\n\n if (str.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }\n}",
"Main",
"public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n String str = s.next();\n\n if (str.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n String str = s.next();\n\n if (str.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"String str = s.next();",
"str",
"s.next()",
"s.next",
"s",
"if (str.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");",
"str.equals(\"ABC\")",
"str.equals",
"str",
"\"ABC\"",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"String[] args",
"args",
"public class Main {\n public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n String str = s.next();\n\n if (str.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }\n}",
"public class Main {\n public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n String str = s.next();\n\n if (str.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner s = new Scanner(System.in);
String str = s.next();
if (str.equals("ABC")) System.out.println("ARC");
else System.out.println("ABC");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
2,
17,
17,
41,
13,
17,
41,
13,
2,
2,
17,
4,
18,
13,
17,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
0,
13,
4,
18,
13,
4,
13,
13,
23,
13,
12,
13,
30,
14,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
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,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
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,
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,
2,
13,
17,
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,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
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
],
[
14,
16
],
[
10,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
10,
22
],
[
22,
23
],
[
22,
24
],
[
10,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
27,
34
],
[
10,
35
],
[
35,
36
],
[
35,
37
],
[
10,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
51,
52
],
[
51,
53
],
[
38,
54
],
[
54,
55
],
[
10,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
59,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
59,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
56,
76
],
[
76,
77
],
[
10,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
78,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
84,
90
],
[
90,
91
],
[
78,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
78,
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
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
111,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
100,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
78,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
78,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
138,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
134,
151
],
[
151,
152
],
[
78,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
157,
161
],
[
78,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
166,
169
],
[
169,
170
],
[
78,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
175,
178
],
[
178,
179
],
[
78,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
184,
187
],
[
187,
188
],
[
78,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
196,
201
],
[
201,
202
],
[
201,
203
],
[
196,
204
],
[
204,
205
],
[
205,
206
],
[
196,
207
],
[
208,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
213,
214
],
[
191,
215
],
[
215,
216
],
[
189,
217
],
[
217,
218
],
[
78,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
225,
226
],
[
225,
227
],
[
221,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
228,
233
],
[
233,
234
],
[
233,
235
],
[
228,
236
],
[
236,
237
],
[
237,
238
],
[
228,
239
],
[
240,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
241,
245
],
[
245,
246
],
[
221,
247
],
[
247,
248
],
[
219,
249
],
[
249,
250
],
[
78,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
253,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
258,
263
],
[
263,
264
],
[
263,
265
],
[
258,
266
],
[
266,
267
],
[
267,
268
],
[
258,
269
],
[
270,
270
],
[
270,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
271,
275
],
[
275,
276
],
[
253,
277
],
[
277,
278
],
[
251,
279
],
[
279,
280
],
[
78,
281
],
[
281,
282
],
[
281,
283
],
[
283,
284
],
[
284,
285
],
[
284,
286
],
[
287,
288
],
[
287,
289
],
[
283,
290
],
[
290,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
290,
295
],
[
295,
296
],
[
295,
297
],
[
290,
298
],
[
298,
299
],
[
299,
300
],
[
290,
301
],
[
302,
302
],
[
302,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
307,
308
],
[
283,
309
],
[
309,
310
],
[
281,
311
],
[
311,
312
]
] |
[
"import java.io.*;\nimport java.io.IOException;\nimport java.util.*;\n\n@SuppressWarnings({\"rawtypes\", \"unchecked\"})\nclass Main {\n final static int INF = 1 << 28;\n final static long LNF = 1L << 60;\n final static double EPS = 1e-9;\n final static double GOLDEN_RATIO = (1.0 + Math.sqrt(5)) / 2.0;\n\n static final long MOD = 1_000_000_007;\n\n public static void main(String[] args) throws Exception {\n final MyScanner sc = new MyScanner();\n String S;\n S = sc.next();\n solve(S);\n }\n\n static void solve(String S){\n if(S.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }\n\n static class MyScanner {\n \n BufferedReader br;\n StringTokenizer st;\n \n MyScanner(FileReader fileReader) {\n br = new BufferedReader(fileReader);\n }\n \n MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String nn() {\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 String next() {\n return nn();\n }\n\n String nextLine() {\n String ans = \"\";\n try {\n ans = br.readLine();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return ans;\n }\n \n char nextChar() {\n return nn().charAt(0);\n }\n \n int nextInt() {\n return Integer.parseInt(nn());\n }\n \n long nextLong() {\n return Long.parseLong(nn());\n }\n \n double nextDouble() {\n return Double.parseDouble(nn());\n }\n \n Integer[] niArr0(int n) {\n Integer[] ar = new Integer[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }\n \n Integer[] niArr1(int n) {\n Integer[] ar = new Integer[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }\n \n Long[] nlArr0(int n) {\n Long[] ar = new Long[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }\n \n Long[] nlArr1(int n) {\n Long[] ar = new Long[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }\n }\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.*;",
"util.*",
"java",
"class Main {\n final static int INF = 1 << 28;\n final static long LNF = 1L << 60;\n final static double EPS = 1e-9;\n final static double GOLDEN_RATIO = (1.0 + Math.sqrt(5)) / 2.0;\n\n static final long MOD = 1_000_000_007;\n\n public static void main(String[] args) throws Exception {\n final MyScanner sc = new MyScanner();\n String S;\n S = sc.next();\n solve(S);\n }\n\n static void solve(String S){\n if(S.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }\n\n static class MyScanner {\n \n BufferedReader br;\n StringTokenizer st;\n \n MyScanner(FileReader fileReader) {\n br = new BufferedReader(fileReader);\n }\n \n MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String nn() {\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 String next() {\n return nn();\n }\n\n String nextLine() {\n String ans = \"\";\n try {\n ans = br.readLine();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return ans;\n }\n \n char nextChar() {\n return nn().charAt(0);\n }\n \n int nextInt() {\n return Integer.parseInt(nn());\n }\n \n long nextLong() {\n return Long.parseLong(nn());\n }\n \n double nextDouble() {\n return Double.parseDouble(nn());\n }\n \n Integer[] niArr0(int n) {\n Integer[] ar = new Integer[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }\n \n Integer[] niArr1(int n) {\n Integer[] ar = new Integer[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }\n \n Long[] nlArr0(int n) {\n Long[] ar = new Long[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }\n \n Long[] nlArr1(int n) {\n Long[] ar = new Long[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }\n }\n\n}",
"Main",
"final static int INF = 1 << 28;",
"INF",
"1 << 28",
"1",
"28",
"final static long LNF = 1L << 60;",
"LNF",
"1L << 60",
"1L",
"60",
"final static double EPS = 1e-9;",
"EPS",
"1e-9",
"final static double GOLDEN_RATIO = (1.0 + Math.sqrt(5)) / 2.0;",
"GOLDEN_RATIO",
"(1.0 + Math.sqrt(5)) / 2.0",
"(1.0 + Math.sqrt(5))",
"1.0",
"Math.sqrt(5)",
"Math.sqrt",
"Math",
"5",
"2.0",
"static final long MOD = 1_000_000_007;",
"MOD",
"1_000_000_007",
"public static void main(String[] args) throws Exception {\n final MyScanner sc = new MyScanner();\n String S;\n S = sc.next();\n solve(S);\n }",
"main",
"{\n final MyScanner sc = new MyScanner();\n String S;\n S = sc.next();\n solve(S);\n }",
"final MyScanner sc = new MyScanner();",
"sc",
"new MyScanner()",
"String S;",
"S",
"S = sc.next()",
"S",
"sc.next()",
"sc.next",
"sc",
"solve(S)",
"solve",
"S",
"String[] args",
"args",
"static void solve(String S){\n if(S.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }",
"solve",
"{\n if(S.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");\n }",
"if(S.equals(\"ABC\")) System.out.println(\"ARC\");\n else System.out.println(\"ABC\");",
"S.equals(\"ABC\")",
"S.equals",
"S",
"\"ABC\"",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"String S",
"S",
"static class MyScanner {\n \n BufferedReader br;\n StringTokenizer st;\n \n MyScanner(FileReader fileReader) {\n br = new BufferedReader(fileReader);\n }\n \n MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String nn() {\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 String next() {\n return nn();\n }\n\n String nextLine() {\n String ans = \"\";\n try {\n ans = br.readLine();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return ans;\n }\n \n char nextChar() {\n return nn().charAt(0);\n }\n \n int nextInt() {\n return Integer.parseInt(nn());\n }\n \n long nextLong() {\n return Long.parseLong(nn());\n }\n \n double nextDouble() {\n return Double.parseDouble(nn());\n }\n \n Integer[] niArr0(int n) {\n Integer[] ar = new Integer[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }\n \n Integer[] niArr1(int n) {\n Integer[] ar = new Integer[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }\n \n Long[] nlArr0(int n) {\n Long[] ar = new Long[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }\n \n Long[] nlArr1(int n) {\n Long[] ar = new Long[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }\n }",
"MyScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"MyScanner(FileReader fileReader) {\n br = new BufferedReader(fileReader);\n }",
"MyScanner",
"{\n br = new BufferedReader(fileReader);\n }",
"br = new BufferedReader(fileReader)",
"br",
"new BufferedReader(fileReader)",
"FileReader fileReader",
"fileReader",
"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 nn() {\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 }",
"nn",
"{\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",
"String next() {\n return nn();\n }",
"next",
"{\n return nn();\n }",
"return nn();",
"nn()",
"nn",
"String nextLine() {\n String ans = \"\";\n try {\n ans = br.readLine();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return ans;\n }",
"nextLine",
"{\n String ans = \"\";\n try {\n ans = br.readLine();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return ans;\n }",
"String ans = \"\";",
"ans",
"\"\"",
"try {\n ans = br.readLine();\n } catch (IOException ex) {\n ex.printStackTrace();\n }",
"catch (IOException ex) {\n ex.printStackTrace();\n }",
"IOException ex",
"{\n ex.printStackTrace();\n }",
"ex.printStackTrace()",
"ex.printStackTrace",
"ex",
"{\n ans = br.readLine();\n }",
"ans = br.readLine()",
"ans",
"br.readLine()",
"br.readLine",
"br",
"return ans;",
"ans",
"char nextChar() {\n return nn().charAt(0);\n }",
"nextChar",
"{\n return nn().charAt(0);\n }",
"return nn().charAt(0);",
"nn().charAt(0)",
"nn().charAt",
"nn()",
"nn",
"0",
"int nextInt() {\n return Integer.parseInt(nn());\n }",
"nextInt",
"{\n return Integer.parseInt(nn());\n }",
"return Integer.parseInt(nn());",
"Integer.parseInt(nn())",
"Integer.parseInt",
"Integer",
"nn()",
"nn",
"long nextLong() {\n return Long.parseLong(nn());\n }",
"nextLong",
"{\n return Long.parseLong(nn());\n }",
"return Long.parseLong(nn());",
"Long.parseLong(nn())",
"Long.parseLong",
"Long",
"nn()",
"nn",
"double nextDouble() {\n return Double.parseDouble(nn());\n }",
"nextDouble",
"{\n return Double.parseDouble(nn());\n }",
"return Double.parseDouble(nn());",
"Double.parseDouble(nn())",
"Double.parseDouble",
"Double",
"nn()",
"nn",
"Integer[] niArr0(int n) {\n Integer[] ar = new Integer[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }",
"niArr0",
"{\n Integer[] ar = new Integer[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }",
"Integer[] ar = new Integer[n];",
"ar",
"new Integer[n]",
"n",
"for (int i = 0; i < n; i++) {\n ar[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n ar[i] = nextInt();\n }",
"{\n ar[i] = nextInt();\n }",
"ar[i] = nextInt()",
"ar[i]",
"ar",
"i",
"nextInt()",
"nextInt",
"return ar;",
"ar",
"int n",
"n",
"Integer[] niArr1(int n) {\n Integer[] ar = new Integer[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }",
"niArr1",
"{\n Integer[] ar = new Integer[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextInt();\n }\n return ar;\n }",
"Integer[] ar = new Integer[n + 1];",
"ar",
"new Integer[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 1; i <= n; i++) {\n ar[i] = nextInt();\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n ar[i] = nextInt();\n }",
"{\n ar[i] = nextInt();\n }",
"ar[i] = nextInt()",
"ar[i]",
"ar",
"i",
"nextInt()",
"nextInt",
"return ar;",
"ar",
"int n",
"n",
"Long[] nlArr0(int n) {\n Long[] ar = new Long[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }",
"nlArr0",
"{\n Long[] ar = new Long[n];\n for (int i = 0; i < n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }",
"Long[] ar = new Long[n];",
"ar",
"new Long[n]",
"n",
"for (int i = 0; i < n; i++) {\n ar[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n ar[i] = nextLong();\n }",
"{\n ar[i] = nextLong();\n }",
"ar[i] = nextLong()",
"ar[i]",
"ar",
"i",
"nextLong()",
"nextLong",
"return ar;",
"ar",
"int n",
"n",
"Long[] nlArr1(int n) {\n Long[] ar = new Long[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }",
"nlArr1",
"{\n Long[] ar = new Long[n + 1];\n for (int i = 1; i <= n; i++) {\n ar[i] = nextLong();\n }\n return ar;\n }",
"Long[] ar = new Long[n + 1];",
"ar",
"new Long[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 1; i <= n; i++) {\n ar[i] = nextLong();\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n ar[i] = nextLong();\n }",
"{\n ar[i] = nextLong();\n }",
"ar[i] = nextLong()",
"ar[i]",
"ar",
"i",
"nextLong()",
"nextLong",
"return ar;",
"ar",
"int n",
"n"
] |
import java.io.*;
import java.io.IOException;
import java.util.*;
@SuppressWarnings({"rawtypes", "unchecked"})
class Main {
final static int INF = 1 << 28;
final static long LNF = 1L << 60;
final static double EPS = 1e-9;
final static double GOLDEN_RATIO = (1.0 + Math.sqrt(5)) / 2.0;
static final long MOD = 1_000_000_007;
public static void main(String[] args) throws Exception {
final MyScanner sc = new MyScanner();
String S;
S = sc.next();
solve(S);
}
static void solve(String S){
if(S.equals("ABC")) System.out.println("ARC");
else System.out.println("ABC");
}
static class MyScanner {
BufferedReader br;
StringTokenizer st;
MyScanner(FileReader fileReader) {
br = new BufferedReader(fileReader);
}
MyScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String nn() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
String next() {
return nn();
}
String nextLine() {
String ans = "";
try {
ans = br.readLine();
} catch (IOException ex) {
ex.printStackTrace();
}
return ans;
}
char nextChar() {
return nn().charAt(0);
}
int nextInt() {
return Integer.parseInt(nn());
}
long nextLong() {
return Long.parseLong(nn());
}
double nextDouble() {
return Double.parseDouble(nn());
}
Integer[] niArr0(int n) {
Integer[] ar = new Integer[n];
for (int i = 0; i < n; i++) {
ar[i] = nextInt();
}
return ar;
}
Integer[] niArr1(int n) {
Integer[] ar = new Integer[n + 1];
for (int i = 1; i <= n; i++) {
ar[i] = nextInt();
}
return ar;
}
Long[] nlArr0(int n) {
Long[] ar = new Long[n];
for (int i = 0; i < n; i++) {
ar[i] = nextLong();
}
return ar;
}
Long[] nlArr1(int n) {
Long[] ar = new Long[n + 1];
for (int i = 1; i <= n; i++) {
ar[i] = nextLong();
}
return ar;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
4,
18,
13,
17,
17,
17,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
41,
13,
17,
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
],
[
13,
14
],
[
12,
15
],
[
12,
16
],
[
11,
17
],
[
7,
18
],
[
18,
19
],
[
18,
20
],
[
7,
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
],
[
33,
36
],
[
32,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
32,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
23,
51
],
[
51,
52
],
[
51,
53
],
[
21,
54
],
[
54,
55
]
] |
[
"\timport java.util.*;\n\timport java.util.Map.Entry;\n\t \n\t \n\t class Main {\n\t\t static int mod = (int) (Math.pow(10,9)+7);\n\t\t static List<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>();\n\t public static void main(String[] args) {\n\t \t\n\t Scanner sc = new Scanner(System.in);\n\t String S = sc.next();\t\n\t if(S.equals(\"ABC\")) {\n\t \tSystem.out.println(\"ARC\");\n\t } else {\n\t \tSystem.out.println(\"ABC\");\n\t }\n\t \n\t \n\t long ans=0;\n\t \n\t }\n\t}",
"import java.util.*;",
"util.*",
"java",
"import java.util.Map.Entry;",
"Entry",
"java.util.Map",
"class Main {\n\t\t static int mod = (int) (Math.pow(10,9)+7);\n\t\t static List<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>();\n\t public static void main(String[] args) {\n\t \t\n\t Scanner sc = new Scanner(System.in);\n\t String S = sc.next();\t\n\t if(S.equals(\"ABC\")) {\n\t \tSystem.out.println(\"ARC\");\n\t } else {\n\t \tSystem.out.println(\"ABC\");\n\t }\n\t \n\t \n\t long ans=0;\n\t \n\t }\n\t}",
"Main",
"static int mod = (int) (Math.pow(10,9)+7);",
"mod",
"(int) (Math.pow(10,9)+7)",
"Math.pow(10,9)",
"Math.pow",
"Math",
"10",
"9",
"7",
"static List<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>();",
"list",
"new ArrayList<ArrayList<Integer>>()",
"public static void main(String[] args) {\n\t \t\n\t Scanner sc = new Scanner(System.in);\n\t String S = sc.next();\t\n\t if(S.equals(\"ABC\")) {\n\t \tSystem.out.println(\"ARC\");\n\t } else {\n\t \tSystem.out.println(\"ABC\");\n\t }\n\t \n\t \n\t long ans=0;\n\t \n\t }",
"main",
"{\n\t \t\n\t Scanner sc = new Scanner(System.in);\n\t String S = sc.next();\t\n\t if(S.equals(\"ABC\")) {\n\t \tSystem.out.println(\"ARC\");\n\t } else {\n\t \tSystem.out.println(\"ABC\");\n\t }\n\t \n\t \n\t long ans=0;\n\t \n\t }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"if(S.equals(\"ABC\")) {\n\t \tSystem.out.println(\"ARC\");\n\t } else {\n\t \tSystem.out.println(\"ABC\");\n\t }",
"S.equals(\"ABC\")",
"S.equals",
"S",
"\"ABC\"",
"{\n\t \tSystem.out.println(\"ARC\");\n\t }",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"{\n\t \tSystem.out.println(\"ABC\");\n\t }",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"long ans=0;",
"ans",
"0",
"String[] args",
"args"
] |
import java.util.*;
import java.util.Map.Entry;
class Main {
static int mod = (int) (Math.pow(10,9)+7);
static List<ArrayList<Integer>> list = new ArrayList<ArrayList<Integer>>();
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
if(S.equals("ABC")) {
System.out.println("ARC");
} else {
System.out.println("ABC");
}
long ans=0;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
39,
5
],
[
39,
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
],
[
18,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
6,
36
],
[
36,
37
],
[
0,
38
],
[
38,
39
],
[
38,
40
]
] |
[
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n String S =sc.next();\n if(S.contains(\"R\")){System.out.println(\"ABC\");}\n else{System.out.println(\"ARC\");}\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 S =sc.next();\n if(S.contains(\"R\")){System.out.println(\"ABC\");}\n else{System.out.println(\"ARC\");}\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n String S =sc.next();\n if(S.contains(\"R\")){System.out.println(\"ABC\");}\n else{System.out.println(\"ARC\");}\n }",
"main",
"{\n Scanner sc =new Scanner(System.in);\n String S =sc.next();\n if(S.contains(\"R\")){System.out.println(\"ABC\");}\n else{System.out.println(\"ARC\");}\n }",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S =sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"if(S.contains(\"R\")){System.out.println(\"ABC\");}\n else{System.out.println(\"ARC\");}",
"S.contains(\"R\")",
"S.contains",
"S",
"\"R\"",
"{System.out.println(\"ABC\");}",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"{System.out.println(\"ARC\");}",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n String S =sc.next();\n if(S.contains(\"R\")){System.out.println(\"ABC\");}\n else{System.out.println(\"ARC\");}\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n String S =sc.next();\n if(S.contains(\"R\")){System.out.println(\"ABC\");}\n else{System.out.println(\"ARC\");}\n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
String S =sc.next();
if(S.contains("R")){System.out.println("ABC");}
else{System.out.println("ARC");}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
45,
5
],
[
45,
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
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
23,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
6,
42
],
[
42,
43
],
[
0,
44
],
[
44,
45
],
[
44,
46
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tString ABC = \"ABC\";\n\t\tString ARC = \"ARC\";\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tif (ABC.equals(s)) {\n\t\t\tSystem.out.println(ARC);\n\t\t} else {\n\t\t\tSystem.out.println(ABC);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tString ABC = \"ABC\";\n\t\tString ARC = \"ARC\";\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tif (ABC.equals(s)) {\n\t\t\tSystem.out.println(ARC);\n\t\t} else {\n\t\t\tSystem.out.println(ABC);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tString ABC = \"ABC\";\n\t\tString ARC = \"ARC\";\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tif (ABC.equals(s)) {\n\t\t\tSystem.out.println(ARC);\n\t\t} else {\n\t\t\tSystem.out.println(ABC);\n\t\t}\n\t}",
"main",
"{\n\t\tString ABC = \"ABC\";\n\t\tString ARC = \"ARC\";\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tif (ABC.equals(s)) {\n\t\t\tSystem.out.println(ARC);\n\t\t} else {\n\t\t\tSystem.out.println(ABC);\n\t\t}\n\t}",
"String ABC = \"ABC\";",
"ABC",
"\"ABC\"",
"String ARC = \"ARC\";",
"ARC",
"\"ARC\"",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if (ABC.equals(s)) {\n\t\t\tSystem.out.println(ARC);\n\t\t} else {\n\t\t\tSystem.out.println(ABC);\n\t\t}",
"ABC.equals(s)",
"ABC.equals",
"ABC",
"s",
"{\n\t\t\tSystem.out.println(ARC);\n\t\t}",
"System.out.println(ARC)",
"System.out.println",
"System.out",
"System",
"System.out",
"ARC",
"{\n\t\t\tSystem.out.println(ABC);\n\t\t}",
"System.out.println(ABC)",
"System.out.println",
"System.out",
"System",
"System.out",
"ABC",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tString ABC = \"ABC\";\n\t\tString ARC = \"ARC\";\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tif (ABC.equals(s)) {\n\t\t\tSystem.out.println(ARC);\n\t\t} else {\n\t\t\tSystem.out.println(ABC);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tString ABC = \"ABC\";\n\t\tString ARC = \"ARC\";\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tif (ABC.equals(s)) {\n\t\t\tSystem.out.println(ARC);\n\t\t} else {\n\t\t\tSystem.out.println(ABC);\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
String ABC = "ABC";
String ARC = "ARC";
Scanner sc = new Scanner(System.in);
String s = sc.next();
if (ABC.equals(s)) {
System.out.println(ARC);
} else {
System.out.println(ABC);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
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,
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,
4,
13,
12,
13,
30,
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,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
154,
8
],
[
154,
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
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
23,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
9,
40
],
[
40,
41
],
[
154,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
42,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
48,
54
],
[
54,
55
],
[
42,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
56,
62
],
[
62,
63
],
[
42,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
67,
76
],
[
76,
77
],
[
76,
78
],
[
66,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
42,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
42,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
42,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
42,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
115,
116
],
[
42,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
42,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
136,
137
],
[
136,
138
],
[
131,
139
],
[
139,
140
],
[
140,
141
],
[
131,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
147,
148
],
[
126,
149
],
[
149,
150
],
[
124,
151
],
[
151,
152
],
[
0,
153
],
[
153,
154
],
[
153,
155
]
] |
[
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\tString s=sc.next();\n\t\tif(s.equals(\"ABC\"))System.out.println(\"ARC\");\n\t\telse System.out.println(\"ABC\");\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n\n\t\tpublic Scanner(String file) throws FileNotFoundException {\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\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\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 String nextLine() throws IOException {\n\t\t\treturn br.readLine();\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t\tpublic int[] nextArr(int n) throws IOException{\n\t\t\tint arr[]=new int[n];\n\t\t\tfor(int i=0;i<n;i++)arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\tString s=sc.next();\n\t\tif(s.equals(\"ABC\"))System.out.println(\"ARC\");\n\t\telse System.out.println(\"ABC\");\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n\n\t\tpublic Scanner(String file) throws FileNotFoundException {\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\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\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 String nextLine() throws IOException {\n\t\t\treturn br.readLine();\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t\tpublic int[] nextArr(int n) throws IOException{\n\t\t\tint arr[]=new int[n];\n\t\t\tfor(int i=0;i<n;i++)arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\tString s=sc.next();\n\t\tif(s.equals(\"ABC\"))System.out.println(\"ARC\");\n\t\telse System.out.println(\"ABC\");\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\tString s=sc.next();\n\t\tif(s.equals(\"ABC\"))System.out.println(\"ARC\");\n\t\telse System.out.println(\"ABC\");\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"String s=sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if(s.equals(\"ABC\"))System.out.println(\"ARC\");\n\t\telse System.out.println(\"ABC\");",
"s.equals(\"ABC\")",
"s.equals",
"s",
"\"ABC\"",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"String[] args",
"args",
"static class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n\n\t\tpublic Scanner(String file) throws FileNotFoundException {\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\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\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 String nextLine() throws IOException {\n\t\t\treturn br.readLine();\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t\tpublic int[] nextArr(int n) throws IOException{\n\t\t\tint arr[]=new int[n];\n\t\t\tfor(int i=0;i<n;i++)arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\n\t}",
"Scanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}",
"Scanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(s))",
"br",
"new BufferedReader(new InputStreamReader(s))",
"InputStream s",
"s",
"public Scanner(String file) throws FileNotFoundException {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t}",
"Scanner",
"{\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 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 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 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 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 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 int[] nextArr(int n) throws IOException{\n\t\t\tint arr[]=new int[n];\n\t\t\tfor(int i=0;i<n;i++)arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}",
"nextArr",
"{\n\t\t\tint arr[]=new int[n];\n\t\t\tfor(int i=0;i<n;i++)arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}",
"int arr[]=new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=0;i<n;i++)arr[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i]=nextInt();",
"arr[i]=nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\tString s=sc.next();\n\t\tif(s.equals(\"ABC\"))System.out.println(\"ARC\");\n\t\telse System.out.println(\"ABC\");\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n\n\t\tpublic Scanner(String file) throws FileNotFoundException {\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\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\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 String nextLine() throws IOException {\n\t\t\treturn br.readLine();\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t\tpublic int[] nextArr(int n) throws IOException{\n\t\t\tint arr[]=new int[n];\n\t\t\tfor(int i=0;i<n;i++)arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\tString s=sc.next();\n\t\tif(s.equals(\"ABC\"))System.out.println(\"ARC\");\n\t\telse System.out.println(\"ABC\");\n\t}\n\n\tstatic class Scanner {\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream s) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(s));\n\t\t}\n\n\t\tpublic Scanner(String file) throws FileNotFoundException {\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\n\t\tpublic int nextInt() throws IOException {\n\t\t\treturn Integer.parseInt(next());\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 String nextLine() throws IOException {\n\t\t\treturn br.readLine();\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 boolean ready() throws IOException {\n\t\t\treturn br.ready();\n\t\t}\n\t\tpublic int[] nextArr(int n) throws IOException{\n\t\t\tint arr[]=new int[n];\n\t\t\tfor(int i=0;i<n;i++)arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\n\n\t}\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
PrintWriter pw = new PrintWriter(System.out);
String s=sc.next();
if(s.equals("ABC"))System.out.println("ARC");
else System.out.println("ABC");
}
static class Scanner {
StringTokenizer st;
BufferedReader br;
public Scanner(InputStream s) {
br = new BufferedReader(new InputStreamReader(s));
}
public Scanner(String file) throws FileNotFoundException {
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 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 double nextDouble() throws IOException {
return Double.parseDouble(next());
}
public boolean ready() throws IOException {
return br.ready();
}
public int[] nextArr(int n) throws IOException{
int arr[]=new int[n];
for(int i=0;i<n;i++)arr[i]=nextInt();
return arr;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
17,
13,
30,
4,
18,
18,
13,
13,
17,
14,
4,
18,
17,
13,
30,
4,
18,
18,
13,
13,
17,
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
],
[
18,
19
],
[
19,
20
],
[
18,
21
],
[
17,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
29,
34
],
[
34,
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\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString n = sc.next();\n\n\t\tif (\"ABC\".equals(n)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t\tsc.close();\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\tString n = sc.next();\n\n\t\tif (\"ABC\".equals(n)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString n = sc.next();\n\n\t\tif (\"ABC\".equals(n)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString n = sc.next();\n\n\t\tif (\"ABC\".equals(n)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String n = sc.next();",
"n",
"sc.next()",
"sc.next",
"sc",
"if (\"ABC\".equals(n)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}",
"\"ABC\".equals(n)",
"\"ABC\".equals",
"\"ABC\"",
"n",
"{\n\t\t\tSystem.out.println(\"ARC\");\n\t\t}",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}",
"\"ARC\".equals(n)",
"\"ARC\".equals",
"\"ARC\"",
"n",
"{\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString n = sc.next();\n\n\t\tif (\"ABC\".equals(n)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t\tsc.close();\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\tString n = sc.next();\n\n\t\tif (\"ABC\".equals(n)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else if (\"ARC\".equals(n)){\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t\tsc.close();\n\t}\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.next();
if ("ABC".equals(n)) {
System.out.println("ARC");
} else if ("ARC".equals(n)){
System.out.println("ABC");
}
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
47,
8
],
[
47,
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
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
9,
44
],
[
44,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
]
] |
[
"import java.nio.channels.AsynchronousByteChannel;\nimport java.util.Scanner;\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nString K= scan.next();\n\nif (K.equals(\"ABC\")){System.out.println(\"ARC\");};\n if (K.equals(\"ARC\")){System.out.println(\"ABC\");};\n\n \n }\n}",
"import java.nio.channels.AsynchronousByteChannel;",
"AsynchronousByteChannel",
"java.nio.channels",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nString K= scan.next();\n\nif (K.equals(\"ABC\")){System.out.println(\"ARC\");};\n if (K.equals(\"ARC\")){System.out.println(\"ABC\");};\n\n \n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nString K= scan.next();\n\nif (K.equals(\"ABC\")){System.out.println(\"ARC\");};\n if (K.equals(\"ARC\")){System.out.println(\"ABC\");};\n\n \n }",
"main",
"{\n Scanner scan=new Scanner(System.in);\nString K= scan.next();\n\nif (K.equals(\"ABC\")){System.out.println(\"ARC\");};\n if (K.equals(\"ARC\")){System.out.println(\"ABC\");};\n\n \n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String K= scan.next();",
"K",
"scan.next()",
"scan.next",
"scan",
"if (K.equals(\"ABC\")){System.out.println(\"ARC\");}",
"K.equals(\"ABC\")",
"K.equals",
"K",
"\"ABC\"",
"{System.out.println(\"ARC\");}",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"if (K.equals(\"ARC\")){System.out.println(\"ABC\");}",
"K.equals(\"ARC\")",
"K.equals",
"K",
"\"ARC\"",
"{System.out.println(\"ABC\");}",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nString K= scan.next();\n\nif (K.equals(\"ABC\")){System.out.println(\"ARC\");};\n if (K.equals(\"ARC\")){System.out.println(\"ABC\");};\n\n \n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\nString K= scan.next();\n\nif (K.equals(\"ABC\")){System.out.println(\"ARC\");};\n if (K.equals(\"ARC\")){System.out.println(\"ABC\");};\n\n \n }\n}",
"Main"
] |
import java.nio.channels.AsynchronousByteChannel;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
String K= scan.next();
if (K.equals("ABC")){System.out.println("ARC");};
if (K.equals("ARC")){System.out.println("ABC");};
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
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
],
[
90,
8
],
[
90,
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
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
9,
37
],
[
37,
38
],
[
90,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
39,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
54,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
48,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
39,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
39,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n MyScanner sc = new MyScanner();\n\n String a = sc.next();\n\n if (a.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\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.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n MyScanner sc = new MyScanner();\n\n String a = sc.next();\n\n if (a.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\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 String a = sc.next();\n\n if (a.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }",
"main",
"{\n MyScanner sc = new MyScanner();\n\n String a = sc.next();\n\n if (a.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }",
"MyScanner sc = new MyScanner();",
"sc",
"new MyScanner()",
"String a = sc.next();",
"a",
"sc.next()",
"sc.next",
"sc",
"if (a.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");",
"a.equals(\"ABC\")",
"a.equals",
"a",
"\"ABC\"",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"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 String a = sc.next();\n\n if (a.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\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 String a = sc.next();\n\n if (a.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\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.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
MyScanner sc = new MyScanner();
String a = sc.next();
if (a.equals("ABC"))
System.out.println("ARC");
else
System.out.println("ABC");
}
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,
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,
4,
18,
13,
14,
4,
18,
17,
13,
4,
18,
13,
17,
4,
18,
13,
17,
23,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
81,
17
],
[
81,
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
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
81,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
61,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
61,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
53,
74
],
[
74,
75
],
[
53,
76
],
[
76,
77
],
[
53,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\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 Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n A solver = new A();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class A {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n\n // 出力\n if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");\n\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.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n A solver = new A();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class A {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n\n // 出力\n if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");\n\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n A solver = new A();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n A solver = new A();\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",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"A solver = new A();",
"solver",
"new A()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class A {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n\n // 出力\n if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");\n\n }\n\n }",
"A",
"public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n\n // 出力\n if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");\n\n }",
"solve",
"{\n // 入力\n String S = in.next();\n\n // 出力\n if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");\n\n }",
"String S = in.next();",
"S",
"in.next()",
"in.next",
"in",
"if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");",
"\"ABC\".equals(S)",
"\"ABC\".equals",
"\"ABC\"",
"S",
"out.println(\"ARC\")",
"out.println",
"out",
"\"ARC\"",
"out.println(\"ABC\")",
"out.println",
"out",
"\"ABC\"",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n A solver = new A();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class A {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n\n // 出力\n if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");\n\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 Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n A solver = new A();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class A {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n\n // 出力\n if (\"ABC\".equals(S)) out.println(\"ARC\");\n else out.println(\"ABC\");\n\n }\n\n }\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* 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;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
A solver = new A();
solver.solve(1, in, out);
out.close();
}
static class A {
public void solve(int testNumber, Scanner in, PrintWriter out) {
// 入力
String S = in.next();
// 出力
if ("ABC".equals(S)) out.println("ARC");
else out.println("ABC");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
4,
18,
13,
17,
17,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
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
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
20,
24
],
[
18,
25
],
[
17,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
17,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
6,
38
],
[
38,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
]
] |
[
"import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n if(s.substring(1,2).equals(\"R\"))\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\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 String s = sc.next();\n if(s.substring(1,2).equals(\"R\"))\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n if(s.substring(1,2).equals(\"R\"))\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n if(s.substring(1,2).equals(\"R\"))\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"if(s.substring(1,2).equals(\"R\"))\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");",
"s.substring(1,2).equals(\"R\")",
"s.substring(1,2).equals",
"s.substring(1,2)",
"s.substring",
"s",
"1",
"2",
"\"R\"",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n if(s.substring(1,2).equals(\"R\"))\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n if(s.substring(1,2).equals(\"R\"))\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
if(s.substring(1,2).equals("R"))
System.out.println("ABC");
else
System.out.println("ARC");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
14,
2,
4,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
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
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
18,
23
],
[
17,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
17,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
31,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
31,
45
],
[
6,
46
],
[
46,
47
],
[
0,
48
],
[
48,
49
],
[
48,
50
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n\n if (S.charAt(1) == 'B') {\n System.out.println(\"ARC\");\n } else if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\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\n String S = sc.next();\n\n if (S.charAt(1) == 'B') {\n System.out.println(\"ARC\");\n } else if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\n\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n\n if (S.charAt(1) == 'B') {\n System.out.println(\"ARC\");\n } else if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\n\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n\n if (S.charAt(1) == 'B') {\n System.out.println(\"ARC\");\n } else if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\n\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"if (S.charAt(1) == 'B') {\n System.out.println(\"ARC\");\n } else if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\n\n }",
"S.charAt(1) == 'B'",
"S.charAt(1)",
"S.charAt",
"S",
"1",
"'B'",
"{\n System.out.println(\"ARC\");\n }",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\n\n }",
"S.charAt(1) == 'R'",
"S.charAt(1)",
"S.charAt",
"S",
"1",
"'R'",
"{\n System.out.println(\"ABC\");\n }",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"{\n\n }",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n\n if (S.charAt(1) == 'B') {\n System.out.println(\"ARC\");\n } else if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\n\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n\n if (S.charAt(1) == 'B') {\n System.out.println(\"ARC\");\n } else if (S.charAt(1) == 'R') {\n System.out.println(\"ABC\");\n } else {\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 S = sc.next();
if (S.charAt(1) == 'B') {
System.out.println("ARC");
} else if (S.charAt(1) == 'R') {
System.out.println("ABC");
} else {
}
}
}
|
[
7,
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,
14,
4,
18,
4,
18,
13,
17,
30,
4,
18,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
50,
17
],
[
50,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
28,
33
],
[
27,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
27,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
20,
44
],
[
44,
45
],
[
45,
46
],
[
18,
47
],
[
47,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
]
] |
[
"import java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.Map;\nimport java.util.Scanner;\nimport java.util.TreeMap;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n PrintWriter printWriter = new PrintWriter(System.out);\n if (scanner.nextLine().equals(\"ABC\")) {\n printWriter.println(\"ARC\");\n }else {\n printWriter.println(\"ABC\");\n }\n printWriter.flush();\n }\n}",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.TreeMap;",
"TreeMap",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n PrintWriter printWriter = new PrintWriter(System.out);\n if (scanner.nextLine().equals(\"ABC\")) {\n printWriter.println(\"ARC\");\n }else {\n printWriter.println(\"ABC\");\n }\n printWriter.flush();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n PrintWriter printWriter = new PrintWriter(System.out);\n if (scanner.nextLine().equals(\"ABC\")) {\n printWriter.println(\"ARC\");\n }else {\n printWriter.println(\"ABC\");\n }\n printWriter.flush();\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n PrintWriter printWriter = new PrintWriter(System.out);\n if (scanner.nextLine().equals(\"ABC\")) {\n printWriter.println(\"ARC\");\n }else {\n printWriter.println(\"ABC\");\n }\n printWriter.flush();\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"PrintWriter printWriter = new PrintWriter(System.out);",
"printWriter",
"new PrintWriter(System.out)",
"if (scanner.nextLine().equals(\"ABC\")) {\n printWriter.println(\"ARC\");\n }else {\n printWriter.println(\"ABC\");\n }",
"scanner.nextLine().equals(\"ABC\")",
"scanner.nextLine().equals",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"\"ABC\"",
"{\n printWriter.println(\"ARC\");\n }",
"printWriter.println(\"ARC\")",
"printWriter.println",
"printWriter",
"\"ARC\"",
"{\n printWriter.println(\"ABC\");\n }",
"printWriter.println(\"ABC\")",
"printWriter.println",
"printWriter",
"\"ABC\"",
"printWriter.flush()",
"printWriter.flush",
"printWriter",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n PrintWriter printWriter = new PrintWriter(System.out);\n if (scanner.nextLine().equals(\"ABC\")) {\n printWriter.println(\"ARC\");\n }else {\n printWriter.println(\"ABC\");\n }\n printWriter.flush();\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n PrintWriter printWriter = new PrintWriter(System.out);\n if (scanner.nextLine().equals(\"ABC\")) {\n printWriter.println(\"ARC\");\n }else {\n printWriter.println(\"ABC\");\n }\n printWriter.flush();\n }\n}",
"Main"
] |
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
PrintWriter printWriter = new PrintWriter(System.out);
if (scanner.nextLine().equals("ABC")) {
printWriter.println("ARC");
}else {
printWriter.println("ABC");
}
printWriter.flush();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
4,
18,
13,
17,
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
],
[
24,
25
],
[
23,
26
],
[
22,
27
],
[
22,
28
],
[
6,
29
],
[
29,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String... args) {\n Scanner scanner = new Scanner(System.in);\n\n String S = scanner.next();\n\n System.out.println(S.equals(\"ABC\") ? \"ARC\" : \"ABC\");\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\n String S = scanner.next();\n\n System.out.println(S.equals(\"ABC\") ? \"ARC\" : \"ABC\");\n }\n}",
"Main",
"public static void main(String... args) {\n Scanner scanner = new Scanner(System.in);\n\n String S = scanner.next();\n\n System.out.println(S.equals(\"ABC\") ? \"ARC\" : \"ABC\");\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n String S = scanner.next();\n\n System.out.println(S.equals(\"ABC\") ? \"ARC\" : \"ABC\");\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String S = scanner.next();",
"S",
"scanner.next()",
"scanner.next",
"scanner",
"System.out.println(S.equals(\"ABC\") ? \"ARC\" : \"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"S.equals(\"ABC\") ? \"ARC\" : \"ABC\"",
"S.equals(\"ABC\")",
"S.equals",
"S",
"\"ABC\"",
"\"ARC\"",
"\"ABC\"",
"String... args",
"args",
"public class Main {\n public static void main(String... args) {\n Scanner scanner = new Scanner(System.in);\n\n String S = scanner.next();\n\n System.out.println(S.equals(\"ABC\") ? \"ARC\" : \"ABC\");\n }\n}",
"public class Main {\n public static void main(String... args) {\n Scanner scanner = new Scanner(System.in);\n\n String S = scanner.next();\n\n System.out.println(S.equals(\"ABC\") ? \"ARC\" : \"ABC\");\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String... args) {
Scanner scanner = new Scanner(System.in);
String S = scanner.next();
System.out.println(S.equals("ABC") ? "ARC" : "ABC");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
14,
4,
18,
17,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
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
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
20,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
20,
32
],
[
32,
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\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString name = scanner.next();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\tif (\"ABC\".equals(name)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else {\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString name = scanner.next();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\tif (\"ABC\".equals(name)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else {\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString name = scanner.next();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\tif (\"ABC\".equals(name)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else {\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t}",
"main",
"{\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString name = scanner.next();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\tif (\"ABC\".equals(name)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else {\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String name = scanner.next();",
"name",
"scanner.next()",
"scanner.next",
"scanner",
"scanner.close()",
"scanner.close",
"scanner",
"if (\"ABC\".equals(name)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else {\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}",
"\"ABC\".equals(name)",
"\"ABC\".equals",
"\"ABC\"",
"name",
"{\n\t\t\tSystem.out.println(\"ARC\");\n\t\t}",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"{\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"String[] args",
"args",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString name = scanner.next();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\tif (\"ABC\".equals(name)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else {\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t}\n\n}",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString name = scanner.next();\n\t\t\n\t\tscanner.close();\n\t\t\n\t\tif (\"ABC\".equals(name)) {\n\t\t\tSystem.out.println(\"ARC\");\n\t\t} else {\n\t\t\tSystem.out.println(\"ABC\");\n\t\t}\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String name = scanner.next();
scanner.close();
if ("ABC".equals(name)) {
System.out.println("ARC");
} else {
System.out.println("ABC");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
17,
42,
2,
40,
13,
17,
4,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
12,
13,
30,
29,
8,
2,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
196,
14
],
[
196,
15
],
[
15,
16
],
[
15,
17
],
[
196,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
18,
31
],
[
31,
32
],
[
196,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
41,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
196,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
64,
69
],
[
60,
70
],
[
70,
71
],
[
60,
72
],
[
72,
73
],
[
196,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
78,
83
],
[
74,
84
],
[
84,
85
],
[
74,
86
],
[
86,
87
],
[
196,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
88,
103
],
[
103,
104
],
[
88,
105
],
[
105,
106
],
[
196,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
107,
111
],
[
111,
112
],
[
107,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
107,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
122,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
132,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
121,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
107,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
154,
155
],
[
107,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
160,
163
],
[
163,
164
],
[
107,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
169,
172
],
[
172,
173
],
[
107,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
180,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
176,
193
],
[
193,
194
],
[
0,
195
],
[
195,
196
],
[
195,
197
]
] |
[
"//package code;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n/**\n *\n * @author Milo\n */\npublic class Main {\n \n static FastReader in = new FastReader();\n public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }\n \n public static void solve() {\n String s = in.next();\n if(s.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else{\n System.out.println(\"ABC\");\n }\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 \n public static int max(int a, int b) {\n return a > b ? a : b;\n }\n \n public static int min(int a, int b) {\n return a < b ? a : b;\n }\n \n public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\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 \n static FastReader in = new FastReader();\n public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }\n \n public static void solve() {\n String s = in.next();\n if(s.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else{\n System.out.println(\"ABC\");\n }\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 \n public static int max(int a, int b) {\n return a > b ? a : b;\n }\n \n public static int min(int a, int b) {\n return a < b ? a : b;\n }\n \n public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\n }\n}",
"Main",
"static FastReader in = new FastReader();",
"in",
"new FastReader()",
"public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }",
"main",
"{\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }",
"int t = 1;",
"t",
"1",
"while (t-- > 0)\n solve();",
"t-- > 0",
"t--",
"t",
"0",
"solve()",
"solve",
"String[] args",
"args",
"public static void solve() {\n String s = in.next();\n if(s.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else{\n System.out.println(\"ABC\");\n }\n }",
"solve",
"{\n String s = in.next();\n if(s.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else{\n System.out.println(\"ABC\");\n }\n }",
"String s = in.next();",
"s",
"in.next()",
"in.next",
"in",
"if(s.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else{\n System.out.println(\"ABC\");\n }",
"s.equals(\"ABC\")",
"s.equals",
"s",
"\"ABC\"",
"{\n System.out.println(\"ARC\");\n }",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"{\n System.out.println(\"ABC\");\n }",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"public static int max(int a, int b) {\n return a > b ? a : b;\n }",
"max",
"{\n return a > b ? a : b;\n }",
"return a > b ? a : b;",
"a > b ? a : b",
"a > b",
"a",
"b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static int min(int a, int b) {\n return a < b ? a : b;\n }",
"min",
"{\n return a < b ? a : b;\n }",
"return a < b ? a : b;",
"a < b ? a : b",
"a < b",
"a",
"b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\n }",
"gcd",
"{\n return b == 0 ? a : gcd(b, (a % b));\n }",
"return b == 0 ? a : gcd(b, (a % b));",
"b == 0 ? a : gcd(b, (a % b))",
"b == 0",
"b",
"0",
"a",
"gcd(b, (a % b))",
"gcd",
"b",
"(a % b)",
"a",
"b",
"int a",
"a",
"int b",
"b",
"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",
"public class Main {\n \n static FastReader in = new FastReader();\n public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }\n \n public static void solve() {\n String s = in.next();\n if(s.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else{\n System.out.println(\"ABC\");\n }\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 \n public static int max(int a, int b) {\n return a > b ? a : b;\n }\n \n public static int min(int a, int b) {\n return a < b ? a : b;\n }\n \n public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\n }\n}",
"public class Main {\n \n static FastReader in = new FastReader();\n public static void main(String[] args) {\n int t = 1; //in.nextInt();\n while (t-- > 0)\n solve();\n }\n \n public static void solve() {\n String s = in.next();\n if(s.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else{\n System.out.println(\"ABC\");\n }\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 \n public static int max(int a, int b) {\n return a > b ? a : b;\n }\n \n public static int min(int a, int b) {\n return a < b ? a : b;\n }\n \n public static int gcd(int a, int b) {\n return b == 0 ? a : gcd(b, (a % b));\n }\n}",
"Main"
] |
//package code;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author Milo
*/
public class Main {
static FastReader in = new FastReader();
public static void main(String[] args) {
int t = 1; //in.nextInt();
while (t-- > 0)
solve();
}
public static void solve() {
String s = in.next();
if(s.equals("ABC")){
System.out.println("ARC");
}else{
System.out.println("ABC");
}
}
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 int max(int a, int b) {
return a > b ? a : b;
}
public static int min(int a, int b) {
return a < b ? a : b;
}
public static int gcd(int a, int b) {
return b == 0 ? a : gcd(b, (a % b));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
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
],
[
43,
11
],
[
43,
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
],
[
25,
26
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
23,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
12,
40
],
[
40,
41
],
[
0,
42
],
[
42,
43
],
[
42,
44
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String s = in.readLine();\n \n if(s.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String s = in.readLine();\n \n if(s.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }\n}",
"Main",
"public static void main(String[] args) throws IOException{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String s = in.readLine();\n \n if(s.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }",
"main",
"{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String s = in.readLine();\n \n if(s.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = in.readLine();",
"s",
"in.readLine()",
"in.readLine",
"in",
"if(s.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");",
"s.equals(\"ABC\")",
"s.equals",
"s",
"\"ABC\"",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String s = in.readLine();\n \n if(s.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String s = in.readLine();\n \n if(s.equals(\"ABC\"))\n System.out.println(\"ARC\");\n else\n System.out.println(\"ABC\");\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String s = in.readLine();
if(s.equals("ABC"))
System.out.println("ARC");
else
System.out.println("ABC");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
17,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
42,
8
],
[
42,
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
],
[
23,
24
],
[
22,
25
],
[
21,
26
],
[
20,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
20,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
9,
39
],
[
39,
40
],
[
0,
41
],
[
41,
42
],
[
41,
43
]
] |
[
"import java.util.*;\nimport java.lang.*;\npublic class Main\n{\n public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n String s=sc.nextLine();\n if(s.charAt(1)=='R')\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\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 sc = new Scanner(System.in);\n String s=sc.nextLine();\n if(s.charAt(1)=='R')\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n }\n}",
"Main",
"public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n String s=sc.nextLine();\n if(s.charAt(1)=='R')\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s=sc.nextLine();\n if(s.charAt(1)=='R')\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s=sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(s.charAt(1)=='R')\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");",
"s.charAt(1)=='R'",
"s.charAt(1)",
"s.charAt",
"s",
"1",
"'R'",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"String[] args",
"args",
"public class Main\n{\n public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n String s=sc.nextLine();\n if(s.charAt(1)=='R')\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n }\n}",
"public class Main\n{\n public static void main (String[] args)\n {\n Scanner sc = new Scanner(System.in);\n String s=sc.nextLine();\n if(s.charAt(1)=='R')\n System.out.println(\"ABC\");\n else\n System.out.println(\"ARC\");\n }\n}",
"Main"
] |
import java.util.*;
import java.lang.*;
public class Main
{
public static void main (String[] args)
{
Scanner sc = new Scanner(System.in);
String s=sc.nextLine();
if(s.charAt(1)=='R')
System.out.println("ABC");
else
System.out.println("ARC");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
2,
17,
17,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
4,
18,
13,
17,
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
],
[
43,
11
],
[
43,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
17,
19
],
[
14,
20
],
[
20,
21
],
[
20,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
33,
39
],
[
12,
40
],
[
40,
41
],
[
0,
42
],
[
42,
43
],
[
42,
44
]
] |
[
"import java.io.*;\nimport java.math.*;\nimport java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong mod = (long)(1e9+7);\n\t\tScanner input = new Scanner(System.in);\n\t\tString x = input.next();\n\t\tSystem.out.println(x.equals(\"ABC\")?\"ARC\":\"ABC\");\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong mod = (long)(1e9+7);\n\t\tScanner input = new Scanner(System.in);\n\t\tString x = input.next();\n\t\tSystem.out.println(x.equals(\"ABC\")?\"ARC\":\"ABC\");\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tlong mod = (long)(1e9+7);\n\t\tScanner input = new Scanner(System.in);\n\t\tString x = input.next();\n\t\tSystem.out.println(x.equals(\"ABC\")?\"ARC\":\"ABC\");\n\t}",
"main",
"{\n\t\tlong mod = (long)(1e9+7);\n\t\tScanner input = new Scanner(System.in);\n\t\tString x = input.next();\n\t\tSystem.out.println(x.equals(\"ABC\")?\"ARC\":\"ABC\");\n\t}",
"long mod = (long)(1e9+7);",
"mod",
"(long)(1e9+7)",
"1e9",
"7",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"String x = input.next();",
"x",
"input.next()",
"input.next",
"input",
"System.out.println(x.equals(\"ABC\")?\"ARC\":\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"x.equals(\"ABC\")?\"ARC\":\"ABC\"",
"x.equals(\"ABC\")",
"x.equals",
"x",
"\"ABC\"",
"\"ARC\"",
"\"ABC\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong mod = (long)(1e9+7);\n\t\tScanner input = new Scanner(System.in);\n\t\tString x = input.next();\n\t\tSystem.out.println(x.equals(\"ABC\")?\"ARC\":\"ABC\");\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong mod = (long)(1e9+7);\n\t\tScanner input = new Scanner(System.in);\n\t\tString x = input.next();\n\t\tSystem.out.println(x.equals(\"ABC\")?\"ARC\":\"ABC\");\n\t}\n}",
"Main"
] |
import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
long mod = (long)(1e9+7);
Scanner input = new Scanner(System.in);
String x = input.next();
System.out.println(x.equals("ABC")?"ARC":"ABC");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
14,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
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
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
13,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
22,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
22,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
9,
46
],
[
46,
47
]
] |
[
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String str = br.readLine();\n\n if(str.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }\n\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String str = br.readLine();\n\n if(str.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }\n\n }\n }\n}",
"Main",
"public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String str = br.readLine();\n\n if(str.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }\n\n }\n }",
"main",
"{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String str = br.readLine();\n\n if(str.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }\n\n }\n }",
"try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String str = br.readLine();\n\n if(str.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }\n\n }",
"{\n String str = br.readLine();\n\n if(str.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String str = br.readLine();",
"str",
"br.readLine()",
"br.readLine",
"br",
"if(str.equals(\"ABC\")){\n System.out.println(\"ARC\");\n }else if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }",
"str.equals(\"ABC\")",
"str.equals",
"str",
"\"ABC\"",
"{\n System.out.println(\"ARC\");\n }",
"System.out.println(\"ARC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ARC\"",
"if(str.equals(\"ARC\")){\n System.out.println(\"ABC\");\n }",
"str.equals(\"ARC\")",
"str.equals",
"str",
"\"ARC\"",
"{\n System.out.println(\"ABC\");\n }",
"System.out.println(\"ABC\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"ABC\"",
"String args[]",
"args"
] |
import java.io.*;
import java.util.*;
class Main{
public static void main(String args[])throws IOException{
try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
String str = br.readLine();
if(str.equals("ABC")){
System.out.println("ARC");
}else if(str.equals("ARC")){
System.out.println("ABC");
}
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.