結果
| 問題 |
No.289 数字を全て足そう
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-07 12:58:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 444 bytes |
| コンパイル時間 | 909 ms |
| コンパイル使用メモリ | 101,036 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-08-07 12:58:48 |
| 合計ジャッジ時間 | 2,513 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <climits>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <map>
using namespace std;
using ll = long long;
int main(void)
{
string N;
cin >> N;
int Result = 0;
for (int i = 0; i < N.size(); i++)
{
int temp = N.at(i) - 48;
if (0 <= temp && temp <= 9)
{
Result += temp;
}
}
cout << Result << endl;
return 0;
}