結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
![]() |
提出日時 | 2019-04-12 13:22:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 304 bytes |
コンパイル時間 | 572 ms |
コンパイル使用メモリ | 54,768 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-14 00:37:59 |
合計ジャッジ時間 | 1,466 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 1 WA * 20 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(){ char S[10000]; cin>>S; int i; int n; int ans=0; for(i=0;i>=10000;i++){ if(S[i]>=48&&S[i]<=57){ n=S[i]-48; ans+=n; } if(S[i]==0){ break; } } cout<<S; }