結果
問題 | No.656 ゴルフ |
ユーザー |
![]() |
提出日時 | 2018-07-10 09:46:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 325 bytes |
コンパイル時間 | 567 ms |
コンパイル使用メモリ | 60,444 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-19 08:00:54 |
合計ジャッジ時間 | 1,147 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include<string> using namespace std; int main(){ string s; string a; int num,score=0; cin >> s; for (int i = 0; i < 9; i++) { a = s[i]; num = atoi(a.c_str()); if (num == 0) { score += 10; } else { score += num; } } cout << score << endl; }