結果
| 問題 |
No.656 ゴルフ
|
| コンテスト | |
| ユーザー |
hakuchanizkm
|
| 提出日時 | 2019-01-17 11:48:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 556 bytes |
| コンパイル時間 | 964 ms |
| コンパイル使用メモリ | 105,480 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-01 06:55:28 |
| 合計ジャッジ時間 | 1,440 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<regex>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;
using namespace std;
int main(){
string s;
cin>>s;
int ans=0;
rep(i,s.size()){
int a=s[i]-'0';
if(a==0){
ans+=10;
}else{
ans+=a;
}
}
cout<<ans<<endl;
return 0;
}
hakuchanizkm