by@moratorium08
WA
696ms
{؛1+()ɹɐɥɔʇǝƃ=X((0:,0,+W/X¿W⅋X)ɹɐɥɔʇnd؛X=W؛)ɹoɟ}(W'X)uıɐɯ
main(X,M){for(;M=X;putchar(X&M?X/M+'0':0))X=getchar()+1;}
97458620464367039721826146947018284987654321057238617309738321616024924879724707080123456789238514967