結果
問題 |
No.9011 数字を全て足そう(数字だけ)
|
ユーザー |
|
提出日時 | 2024-04-08 21:24:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 487 bytes |
コンパイル時間 | 2,147 ms |
コンパイル使用メモリ | 192,196 KB |
最終ジャッジ日時 | 2025-02-20 23:13:49 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 RE * 17 |
ソースコード
/*==========================================================================*/ /* auther: Dev1ce created: 08.04.2024 21:18:22 */ /*--------------------------------------------------------------------------*/ #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string s; cin >> s; int n = stoi(s); int sum = 0; while (n > 0) { sum += n % 10; n /= 10; } cout << sum << '\n'; return 0; }