結果
| 問題 |
No.289 数字を全て足そう
|
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-09-26 00:32:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 432 bytes |
| コンパイル時間 | 662 ms |
| コンパイル使用メモリ | 79,200 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-18 14:22:18 |
| 合計ジャッジ時間 | 1,492 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
int main() {
int ans = 0;
string S;
cin >> S;
for (int i = 0; i < S.size(); i++) {
if ('0' <= S[i] && S[i] <= '9') {
ans += (int)(S[i] - '0');
}
}
cout << ans << endl;
return 0;
}
prog470