Result

WA

Code [DL]

99v
8:_v#\-1:p0\0+*6
+19<v\+1g0:~<.:
v   >0p1-: #^_68*
<p0,:\-1_v#:g0::
+_v#`*87$<@
^1<

stdin

0972941224492398964745523195185074071244582763790068134183726753409268577742485101290042214902764494

stdout

10 0122244799

stderr

strace