結果
| 問題 |
No.656 ゴルフ
|
| ユーザー |
aim_cpo
|
| 提出日時 | 2018-03-02 22:21:44 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 781 bytes |
| コンパイル時間 | 1,572 ms |
| コンパイル使用メモリ | 168,100 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-06-13 02:57:53 |
| 合計ジャッジ時間 | 2,119 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define show(x) cerr<<#x<<"="<<x<<"\n"
using namespace std;
int n,m;
string s;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.precision(10);
cout<<fixed;
#ifdef LOCAL_DEFINE
FILE *stream1;
//FILE *stream2;
stream1=freopen("in","r",stdin);
//stream2=freopen("out","w",stdout);
if(stream1==NULL)return 0;
//if(stream2==NULL)return 0;
#endif
cin>>s;
int n=(int)s.size();
int ans=0;
for(int i=0;i<n;i++){
if(s[i]=='0')ans+=10;
else ans+=s[i]-'0';
}
cout<<ans<<endl;
#ifdef LOCAL_DEFINE
cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<"s.\n";
fclose(stream1);
//fclose(stream2);
#endif
return 0;
}
aim_cpo