[問題] leetcode Runtime Error消失
開發平台(Platform): (Ex: Win10, Linux, ...)
win7
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
gcc
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
no
問題(Question):
在練習leetcode的283 Move Zeroes
程式寫好了自己測試沒問題
可是網頁上出現了runtime error
按進去細節什麼都沒寫
就只有
"Last executed input: [4,2,4,0,0,3,0,5,1,0]"
我把出現錯誤的那筆資料拿來自己電腦上輸入
可以得到正確結果
想請問一下這樣可能是什麼狀況
餵入的資料(Input):
4,2,4,0,0,3,0,5,1,0
預期的正確結果(Expected Output):
4243510000
錯誤結果(Wrong Output):
runtime error
程式碼(Code):(請善用置底文網頁, 記得排版)
http://codepad.org/bKc9N5vK
補充說明(Supplement):
題目連結在此
https://leetcode.com/problems/move-zeroes/
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 66.86.130.129
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1483724071.A.2E7.html
※ 編輯: nikuman (66.86.130.129), 01/07/2017 01:34:58
→
01/07 01:49, , 1F
01/07 01:49, 1F
→
01/07 01:51, , 2F
01/07 01:51, 2F
推
01/07 02:16, , 3F
01/07 02:16, 3F
input the size of array
1
input the array
0
the output is 0
測試的結果輸入0還是得到0
所以是電腦在執行的內部錯誤嗎QQ
※ 編輯: nikuman (66.86.130.129), 01/07/2017 03:41:25
推
01/07 13:31, , 4F
01/07 13:31, 4F
→
01/07 16:31, , 5F
01/07 16:31, 5F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章
14
42