Result

AC

Duration

771ms

Code [DL]

while 1 do print(io.read():match("(%d) ?%1")or 1)end

stdin

465 227
266 665
822 275
813 776
147 145
322 443
477 735
585 458
372 151
638 684
572 231
356 566
377 678
873 574
669 592
273 371
259 162
971 772
182 238
935 788
711 518
253 352
188 554
728 254
212 225
978 776
691 117
818 164
733 174
551 519
499 543
622 223

stdout

2
6
2
7
1
2
7
1
1
1
2
6
7
1
6
3
1
7
2
8
1
3
8
1
2
7
1
1
3
5
9
2

stderr

/usr/bin/lua5.3: /volume/CODE:1: attempt to index a nil value
stack traceback:
	/volume/CODE:1: in main chunk
	[C]: in ?

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffc4b3eecd0 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x561a6cd91d30 /* 7 vars */) = 0
12    execve("/usr/bin/lua5.3", ["/usr/bin/lua5.3", "/volume/CODE"], 0x561a6cd91d40 /* 7 vars */) = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
12    +++ exited with 1 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=1, si_utime=0, si_stime=0} ---
10    +++ exited with 1 +++