結果
| 問題 |
No.289 数字を全て足そう
|
| コンテスト | |
| ユーザー |
ryogom
|
| 提出日時 | 2019-04-12 13:25:52 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 328 bytes |
| コンパイル時間 | 386 ms |
| コンパイル使用メモリ | 55,108 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-14 00:42:54 |
| 合計ジャッジ時間 | 1,215 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 2 WA * 19 |
ソースコード
#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){
if(S[i]<=57){
n=S[i]-48;
ans+=n;
}
}
if(S[i]==0){
break;
}
}
cout<<ans;
}
ryogom