Submission #3247107
Source Code Expand
using System; using System.Linq;//リストの使用 using System.Collections.Generic; class Program { static void Main() { int answer = 0; int t = int.Parse(Console.ReadLine());//int.Parseは文字列を整数に変換。 for(int i = 0; i < t; i++) { string[] input = Console.ReadLine(); answer = 0; for(int j = 0; j < input.Length - 5; j++) { for(int k = 0; k < 5; k++) { string aim += input[j+k]; if(aim == "kyoto" || aim == "tokyo") { answer ++; j+=4; } } } Console.WriteLine(answer); } } }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | suikameron |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 658 Byte |
Status | CE |
Compile Error
./Main.cs(19,21): error CS1525: Unexpected symbol `+=', expecting `,', `;', or `='