Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Help Problem D没想法了。这种题目都会WA! 帮我看看。是不是我理解错了 program p2509; var n,k:integer; out:longint; procedure main; var i,j,butt:integer; begin out:=n; butt:=n; repeat out:=out+butt div k; butt:=butt mod k +butt div k; until butt<k; end; begin repeat readln(n,k); if n=0 then halt; main; writeln(out); until eof; end. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator