Submission #400245


Source Code Expand

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cctype>
#include<cstdlib>
#include<algorithm>
#include<bitset>
#include<vector>
#include<list>
#include<deque>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<ctime>
#include<complex>
#include<functional>
#include<climits>
#include<cassert>
#include<iterator>
using namespace std;
string s;
int main(){
	cin >> s;
	int sum = 0;
	for (int i = 0; i < s.size(); i++){
		sum += s[i] - '0';
	}
	cout << sum << endl;
	return 0;
}

Submission Info

Submission Time
Task A - 加算王
User Kmcode
Language C++ (GCC 4.9.2)
Score 100
Code Size 629 Byte
Status AC
Exec Time 24 ms
Memory 932 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 15
Set Name Test Cases
Sample subtask0-sample01.txt, subtask0-sample02.txt, subtask0-sample03.txt
All subtask0-sample01.txt, subtask0-sample02.txt, subtask0-sample03.txt, subtask1-01.txt, subtask1-02.txt, subtask1-03.txt, subtask1-04.txt, subtask1-05.txt, subtask1-06.txt, subtask1-07.txt, subtask1-08.txt, subtask1-09.txt, subtask1-10.txt, subtask1-11.txt, subtask1-12.txt
Case Name Status Exec Time Memory
subtask0-sample01.txt AC 23 ms 796 KB
subtask0-sample02.txt AC 23 ms 920 KB
subtask0-sample03.txt AC 22 ms 928 KB
subtask1-01.txt AC 23 ms 928 KB
subtask1-02.txt AC 23 ms 924 KB
subtask1-03.txt AC 22 ms 796 KB
subtask1-04.txt AC 22 ms 796 KB
subtask1-05.txt AC 22 ms 804 KB
subtask1-06.txt AC 24 ms 932 KB
subtask1-07.txt AC 22 ms 800 KB
subtask1-08.txt AC 23 ms 796 KB
subtask1-09.txt AC 23 ms 800 KB
subtask1-10.txt AC 24 ms 736 KB
subtask1-11.txt AC 22 ms 924 KB
subtask1-12.txt AC 22 ms 800 KB