結果

問題 No.9011 数字を全て足そう(数字だけ)
ユーザー YUCQNA30ZV
提出日時 2020-09-12 11:00:29
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 530 bytes
コンパイル時間 783 ms
コンパイル使用メモリ 89,728 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-31 10:53:46
合計ジャッジ時間 1,737 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<sstream>
#include<utility>
#include<map>
#include<climits>
#include<vector>
#include<queue>
#include<algorithm>
#include<set>
#include<stack>
#include<functional>
#include<cmath>
#include<iostream>
using namespace std;
typedef long long ll;
typedef pair<int,int>P;

const ll MOD=1e9+7;
const int INF = 1000000000;

int main()
{
	string s;
	int res=0;
	cin>>s;
	for(int i=0;i<s.size();i++)
	{
		int t=s[i]-'0';
		res+=t;
	}
	cout<<res<<endl;
}
0