結果

問題 No.102 トランプを奪え
ユーザー gigurururugigurururu
提出日時 2014-12-12 21:01:07
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 459 bytes
コンパイル時間 766 ms
コンパイル使用メモリ 6,624 KB
実行使用メモリ 5,972 KB
最終ジャッジ日時 2023-09-02 14:23:19
合計ジャッジ時間 1,571 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,908 KB
testcase_01 AC 11 ms
5,904 KB
testcase_02 AC 12 ms
5,956 KB
testcase_03 AC 11 ms
5,948 KB
testcase_04 AC 11 ms
5,824 KB
testcase_05 AC 11 ms
5,972 KB
testcase_06 AC 11 ms
5,956 KB
testcase_07 AC 11 ms
5,824 KB
testcase_08 AC 12 ms
5,828 KB
testcase_09 AC 11 ms
5,948 KB
testcase_10 AC 11 ms
5,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding:utf-8
N=map(int,raw_input().split())

# 各山の残数のmod 4を求める
mod = [i%4 for i in N]
mod.sort()

# 初期値が勝ちパターンなら次郎の勝利、負けパターンなら太郎の勝利

# 勝ちパターン
#[a,a,a,a]
#[a,a,b,b]
#[0,1,2,3]

# 負けパターン
#[a,a,a,b]
#[a,a,b,c]

if (mod[0]==mod[1] and mod[2]==mod[3]) or mod == [0,1,2,3]:
   winner = "Jiro"
else:
   winner = "Taro"

print(winner)
0