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