Submission #810587
Source Code Expand
#include<iostream> #include<string> using namespace std; string S; int main(){ int n; for(int i=0;i<n;i++){ cin>>S; int p=0,sum=0; while(p<S.size()-4){ string T=S.substr(p,5); if(T=="tokyo" || T=="kyoto"){sum++;p+=5;} else{p++;} } cout<<sum<<endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | E869120 |
Language | C++ (GCC 4.9.2) |
Score | 0 |
Code Size | 301 Byte |
Status | WA |
Exec Time | 26 ms |
Memory | 800 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 0 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 10_random_to_kyo.txt, 20_noised_tokyoto.txt, 99_teuchi.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
10_random_to_kyo.txt | WA | 26 ms | 800 KB |
20_noised_tokyoto.txt | WA | 26 ms | 672 KB |
99_teuchi.txt | WA | 26 ms | 680 KB |