結果
| 問題 |
No.289 数字を全て足そう
|
| コンテスト | |
| ユーザー |
Outing_Island
|
| 提出日時 | 2019-06-26 21:49:30 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 331 bytes |
| コンパイル時間 | 446 ms |
| コンパイル使用メモリ | 55,036 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 04:39:58 |
| 合計ジャッジ時間 | 1,447 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <iostream>
//#include <vector>
//#include <algorithm>
//#include <string>
//#include <iomanip>
using namespace std;
int main()
{
string S;
cin >> S;
int sum = 0;
for (unsigned int i = 0; i < S.length(); i++)
{
if ('1' <= S[i] && S[i] <= '9')
{
sum += S[i] - '0';
}
}
cout << sum << endl;
return 0;
}
Outing_Island