結果

問題 No.88 次はどっちだ
ユーザー uafr_csuafr_cs
提出日時 2015-05-15 03:23:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 579 bytes
コンパイル時間 1,956 ms
コンパイル使用メモリ 72,116 KB
実行使用メモリ 56,120 KB
最終ジャッジ日時 2023-09-20 07:58:48
合計ジャッジ時間 4,195 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,112 KB
testcase_01 AC 118 ms
56,100 KB
testcase_02 AC 119 ms
55,824 KB
testcase_03 AC 120 ms
55,996 KB
testcase_04 AC 119 ms
55,488 KB
testcase_05 AC 121 ms
55,496 KB
testcase_06 AC 122 ms
55,504 KB
testcase_07 AC 125 ms
55,624 KB
testcase_08 AC 123 ms
56,120 KB
testcase_09 AC 122 ms
55,440 KB
testcase_10 AC 123 ms
55,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	// コマの数 は ターン数 + 4 で不変な条件なので, これを利用する.
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final String fst_name = sc.next();
		final String snd_name = "oda".equals(fst_name) ? "yukiko" : "oda";
		
		int count = 0;
		while(sc.hasNext()){
			for(char c : sc.next().toCharArray()){
				count += c != '.' ? 1 : 0;
			}
		}
		
		System.out.println(count % 2 == 0 ? fst_name : snd_name);
		
	}
	
}
0