結果
| 問題 |
No.9011 数字を全て足そう(数字だけ)
|
| ユーザー |
merom686
|
| 提出日時 | 2017-09-22 19:26:56 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 358 bytes |
| コンパイル時間 | 596 ms |
| コンパイル使用メモリ | 73,464 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-13 20:08:51 |
| 合計ジャッジ時間 | 1,316 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
int main() {
char s[101];
cin >> s;
int r = 0;
for (int i = 0;; i++) {
int c = s[i];
if (c == 0) break;
r += c - '0';
}
cout << r << endl;
return 0;
}
merom686