Two coins by *yuko*

program-id.y.data division.working-storage section.
1 m pic 999.
1 n pic 9999.
1 s pic x(9).
procedure division.a.accept s
move 3 to n
if""=s(2:1)add -1to n.move s(1:n)to m
move s(1+n:)to n
compute n=m*n- m- n
display n(4- function log10(n):)if n<>2375 go a.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page