結果
問題 |
No.9011 数字を全て足そう(数字だけ)
|
ユーザー |
|
提出日時 | 2023-01-06 13:29:35 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 716 bytes |
コンパイル時間 | 7,769 ms |
コンパイル使用メモリ | 200,260 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 08:19:44 |
合計ジャッジ時間 | 8,513 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#if !__INCLUDE_LEVEL__ #include __FILE__ using namespace std; int main() { string s; cin >> s; int ans=0; for(char c : s){ ans += int(c-'0'); } cout << ans << endl; } #else #include <bits/stdc++.h> #include <boost/format.hpp> #include <boost/range/algorithm.hpp> #define REP_(i, a_, b_, a, b, ...) for (int i = (a), lim##i = (b); i < lim##i; i++) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(v) (v).begin(),(v).end() template <class T> bool chmin(T &a, const T &b) { return a > b ? a = b, true : false; } template <class T> bool chmax(T &a, const T &b) { return a < b ? a = b, true : false; } template <class T> using V = std::vector<T>; #endif