結果
| 問題 |
No.9011 数字を全て足そう(数字だけ)
|
| ユーザー |
|
| 提出日時 | 2020-08-30 00:22:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 466 bytes |
| コンパイル時間 | 1,754 ms |
| コンパイル使用メモリ | 166,804 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-14 17:43:26 |
| 合計ジャッジ時間 | 2,924 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 17 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
using namespace std;
const long long INF = 1LL << 60;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int main(){
int S;
cin >> S;
int ans = 0;
while(S>0){
ans += S%10;
S /= 10;
}
cout << ans << endl;
return 0;
}