結果

問題 No.9011 数字を全て足そう(数字だけ)
ユーザー HarryHosono
提出日時 2024-04-08 21:26:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 513 bytes
コンパイル時間 2,047 ms
コンパイル使用メモリ 192,260 KB
最終ジャッジ日時 2025-02-20 23:13:57
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

/*==========================================================================*/
/*
    auther:    Dev1ce
    created:   08.04.2024 21:18:22
*/
/*--------------------------------------------------------------------------*/

#include<bits/stdc++.h>

using namespace std;


int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	string s;
	cin >> s;
	int n = (int)s.size();
	int sum = 0;
	for (int i = 0; i < n; i++) {
		int a = s[i] - '0';
		sum += a;
	}
	cout << sum << '\n';
	return 0;
}
0