[問題] ACM10 The 3n+1 problem
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Code::Blocks
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
NO
問題(Question):
今天第一次做ACM的題目就卡關...
我有測試過很多筆資料,輸出的答案和下面的網站一樣
http://uvatoolkit.com/problemssolve.php
但是上傳到下面兩個網站總是回傳Wrong Answer
http://www.programming-challenges.com/
http://uva.onlinejudge.org/
已經檢查到不知道該檢查甚麼了...
希望各位前輩能幫忙看看究竟是哪裡出了錯
餵入的資料(Input):s
221 304
38 849
367 509
362 856
160 968
611 787
535 618
740 764
125 714
926 476
預期的正確結果(Expected Output):
221 304 128
38 849 171
367 509 142
362 856 171
160 968 179
611 787 171
535 618 137
740 764 153
125 714 171
926 476 179
錯誤結果(Wrong Output):
Wrong Answer
程式碼(Code):(請善用置底文網頁, 記得排版)
http://codepad.org/RwQzqykD
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.135.199.129
→
10/17 16:39, , 1F
10/17 16:39, 1F
→
10/17 16:40, , 2F
10/17 16:40, 2F
→
10/17 16:41, , 3F
10/17 16:41, 3F
※ 編輯: Keysholic 來自: 140.111.129.79 (10/17 16:56)
→
10/17 16:57, , 4F
10/17 16:57, 4F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章