結果
| 問題 | No.289 数字を全て足そう |
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-10-16 22:23:55 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 260 bytes |
| 記録 | |
| コンパイル時間 | 312 ms |
| コンパイル使用メモリ | 53,544 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-24 07:37:48 |
| 合計ジャッジ時間 | 1,082 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
//namaega184
int main(){
char s[10001];int len,ans=0;scanf("%s",s);
len=strlen(s);
for(int i=0;i<len;i++)if(s[i]>='0'&&s[i]<='9')ans+=s[i]-'0';
printf("%d\n",ans);
return 0;
}
184