Submission #5565771


Source Code Expand

#include <iostream>
#include <string>

using namespace std;

int main(){
    int T;
    cin >> T;

    for(int i = 0; i < T; i++){
        string test_value;
        cin >> test_value;
        int value_box = 0;
        for(int j = 0; j < test_value.size()-4; j++){
            string tmp = test_value.substr(i, 5);
            if(tmp == "tokyo" || tmp == "kyoto"){
                value_box++; 
                j += 4;
            }
        }
        cout << value_box << endl;
    }

    return 0;
}

Submission Info

Submission Time
Task A - 東京都
User yuyargon
Language C++14 (Clang 3.8.0)
Score 0
Code Size 527 Byte
Status RE
Exec Time 98 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
WA × 1
RE × 2
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 RE 98 ms 256 KB
20_noised_tokyoto.txt WA 2 ms 256 KB
99_teuchi.txt RE 98 ms 256 KB