結果
問題 | No.656 ゴルフ |
ユーザー |
![]() |
提出日時 | 2019-02-16 15:26:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 272 bytes |
コンパイル時間 | 429 ms |
コンパイル使用メモリ | 55,900 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 07:28:52 |
合計ジャッジ時間 | 1,194 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
#include<iostream> #include<string> using namespace std; int main(){ string S; cin>>S; int sum=0; for(int i=0;i<9;i++){ int a=S[i]-'0'; if(a!=0){ sum+=a; }else{ sum+=10; } } cout<<sum<<endl; }