|
|
вернуться в форумwhy wa?only 16 lines.help me! [code deleted] Edited by moderator 24.11.2019 12:59 A hint. > [code deleted] You've made a little mistake. To correct this mistake you only need to embrace some part of your program in {}. Edited by moderator 24.11.2019 13:00 Mine is also 16 lines(Pascal) Послано sqybi 14 янв 2006 17:22 Mine is also 16 lines, but i have a Time Limit Exceeded. Program Copying_1131; Var n, k, s, a, t: Longint; Begin ReadLn(n, k); s := 1; a := 1; t := 0; While s < n Do Begin Inc(s, a); If s > k Then a := k Else a := s; Inc(t); End; Write(t); End. |
|
|