結果
問題 |
No.9011 数字を全て足そう(数字だけ)
|
ユーザー |
![]() |
提出日時 | 2024-11-17 17:50:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 300 bytes |
コンパイル時間 | 1,343 ms |
コンパイル使用メモリ | 167,016 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-17 17:50:51 |
合計ジャッジ時間 | 2,301 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); string s; cin >> s; ll ans = 0; int n = s.size(); rep(i,n) ans += s[i]-'0'; cout << ans << endl; return 0; }