結果
| 問題 | No.289 数字を全て足そう |
| コンテスト | |
| ユーザー |
AQUA16573837
|
| 提出日時 | 2018-03-12 02:31:14 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 59,232 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-05-05 08:10:05 |
| 合計ジャッジ時間 | 1,174 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <stdio.h>
#include <algorithm>
#include <deque>
using namespace std;
using ll = long long;
//289
int main() {
int sum = 0;
char s[10001];
scanf("%s", s);
for (int p = 0; s[p] != 0; p++)
if ('1' <= s[p] && s[p] <= '9')
sum += s[p] - '0';
printf("%d\n", sum);
}
AQUA16573837