結果
問題 |
No.289 数字を全て足そう
|
ユーザー |
![]() |
提出日時 | 2016-05-03 21:12:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 329 bytes |
コンパイル時間 | 1,670 ms |
コンパイル使用メモリ | 166,996 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 00:23:31 |
合計ジャッジ時間 | 2,487 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; struct Initializer { Initializer() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(15); } } initializer; int main() { string s; cin >> s; int res = 0; for (char c : s) { if (isdigit(c)) res += c - '0'; } cout << res << endl; }