by@moratorium08
WA
690ms
{؛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;}
71865374358917205142075259876543210475207082312460167430152494285039019237437030123456789094121370858