[問題] UVA 621 RUNTIME ERROR
UVA 621一直出現runtime error
https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&pag
能否有神人能夠解惑,是出在哪個步驟
感謝
int main(void)
{
char str[10000];
int n;
cin>>n;
while(n--)
{
cin >> str;
if (stoi(str) == 1 || stoi(str)== 4 || stoi(str)== 78)
cout << "+\n";
else if (stoi(str)%100 == 35)
cout << "-\n";
else if (str[0] == '9' && stoi(str)%10 == 4)
cout << "*\n";
else if (str[0] == '1' && str[1] == '9' && str[2] == '0')
cout << "?\n";
}
return 0;
}
-----
Sent from JPTT on my OPPO CPH1917.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 101.9.133.16 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1628350132.A.358.html
※ 編輯: Diastima (101.9.133.16 臺灣), 08/07/2021 23:29:32
→
08/07 23:37,
2年前
, 1F
08/07 23:37, 1F
→
08/07 23:41,
2年前
, 2F
08/07 23:41, 2F
※ 編輯: Diastima (101.9.133.16 臺灣), 08/07/2021 23:42:36
推
08/08 00:00,
2年前
, 3F
08/08 00:00, 3F
→
08/08 00:02,
2年前
, 4F
08/08 00:02, 4F
→
08/08 20:57,
2年前
, 5F
08/08 20:57, 5F
推
08/08 22:15,
2年前
, 6F
08/08 22:15, 6F
→
08/08 22:16,
2年前
, 7F
08/08 22:16, 7F