Submission #533067


Source Code Expand

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		
		Scanner scan = new Scanner(System.in);	
		
		int sum = 0;
		int n = scan.nextInt();
		
		for(int i = 0 ; i <= n ; i++){
			String str = scan.nextLine();
			str = str.replaceAll("tokyo","1").replaceAll("kyoto","1");
			for(int j = 0 ; j < str.length() ; j++){
				if(str.charAt(j) == '1'){
					sum++;
				}
			}
		}
		
		System.out.println(sum);
		
		
	}
}

Submission Info

Submission Time
Task A - 東京都
User kisinnkisi
Language Java (OpenJDK 1.7.0)
Score 0
Code Size 474 Byte
Status WA
Exec Time 489 ms
Memory 27044 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
WA × 3
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 475 ms 26896 KB
20_noised_tokyoto.txt WA 489 ms 27044 KB
99_teuchi.txt WA 444 ms 24944 KB