Submission #2672235
Source Code Expand
#include<bits/stdc++.h> using namespace std; long long i,n; string s; int main() { scanf("%s",&s); for (i=0;i<6;i++) if (s[i]==49) n++; printf("%d\n",n); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Accepted...? |
User | luogu_bot1 |
Language | C++ (GCC 5.4.1) |
Score | 0 |
Code Size | 183 Byte |
Status | RE |
Exec Time | 97 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:7:15: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘std::string* {aka std::basic_string<char>*}’ [-Wformat=] scanf("%s",&s); ^ ./Main.cpp:10:17: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=] printf("%d\n",n); ^ ./Main.cpp:7:16: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",&s); ^
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt, s3.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, s1.txt, s2.txt, s3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | RE | 96 ms | 256 KB |
02.txt | RE | 96 ms | 256 KB |
03.txt | RE | 96 ms | 256 KB |
04.txt | RE | 96 ms | 256 KB |
05.txt | RE | 96 ms | 256 KB |
06.txt | RE | 97 ms | 256 KB |
07.txt | RE | 97 ms | 256 KB |
s1.txt | RE | 97 ms | 256 KB |
s2.txt | RE | 96 ms | 256 KB |
s3.txt | RE | 97 ms | 256 KB |