Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr


        

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, you will still get Wrong Answer because the complete output may be longer and there might be errors in the future lines.

Please double check your code to solve this problem and try again.

Your Answer

282
98
136
288
230
204
153
229
244
162
429
398
264
364
393
225
171
295
233
279
332
478
257
280
286
267
187
245
258
5
423
137
211
494
462
245
177
198
209
347
428
273
447
442
462
298
155
154
169
380
229
407
162
174
281
136
339
340
397
530
169
192
182
212
292
247
494
313
217
387
101
238
409
286
181
401
433
218
275
160
394
227
197
303
403
110
261
204
117
195
153
364
157
65
302
338
319
256
392
400
146
376
129
496
280
233
198
324
351
131
239
339
226
288
206
268
260
157
172
402
367
369
269
188
345
108
270
449
96
256
471
326
150
290
331
179
234
104
438
351
231
394
97
238
353
277
186
197
315
485
154
177
428
345
80
445
242
226
227
135
88
80
349
474
236
354
272
98
359
296
478
423
291
176
103
210
91
238
256
221
290
252
337
281
239
237
237
235
153
422
464
325
211
298
336
443
142
249
275
409
350
380
273
384
141
445
420
459
269
55
151
455
349
197
227
169
182
223
142
320
291
86
233
365
139
72
103
80
262
331
303
361
228
324
91
124
333
447
518
312
301
282
205
211
186
102
236
324
307
169
124
218
253
325
291
464
178
434
369
407

JOJ Answer

-117
784
-23
-177
798
-121
-46
749
811
824
833
-9
772
1094
-88
839
-80
863
-142
-209
-143
-31
-33
875
-81
-214
-19
843
-19
842
779
925
1358
904
-16
-54
765
803
-49
839
1073
-93
847
956
-18
-129
-56
-45
-102
852
-58
-95
-11
928
2009
913
927
-42
-140
825
934
897
763
-92
-66
858
750
966
-13
818
-38
801
912
896
-104
821
807
-57
750
843
-19
-100
-70
848
-73
-10
-57
796
813
761
871
-54
800
801
-16
783
925
-129
821
-43
-81
916
-18
897
1024
919
-13
-28
-160
1003
986
756
808
-65
898
1542
959
-45
750
946
-27
-53
840
884
-66
889
-22
-71
-60
-38
852
837
912
833
-136
-38
-99
-78
-89
-153
972
-78
-64
923
-102
814
837
776
895
-18
763
-95
-19
886
766
773
-97
993
-128
804
794
-65
-112
836
-170
803
-215
811
950
-139
776
-88
798
1246
804
-96
788
795
-85
-198
-78
823
-164
1092
-103
805
984
989
-128
749
-31
756
782
864
-65
750
910
909
859
-114
1011
-76
796
936
923
-91
-43
862
-12
806
-78
780
969
837
824
786
916
924
-79
769
1170
856
1071
-49
-37
873
827
-43
1942
-120
932
-161
980
-72
854
796
-172
-14
852
-83
1476
-100
831
922
-25