結果

問題 No.946 箱箱箱
ユーザー pekempey
提出日時 2019-12-09 00:33:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 526 ms
コンパイル使用メモリ 82,552 KB
実行使用メモリ 70,132 KB
最終ジャッジ日時 2025-01-02 22:26:20
合計ジャッジ時間 5,596 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 42 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = []
for i in range(N):
  A.append(int(input()))

aru = False

x = 0
for i in range(N):
  x ^= A[i]
  if x == 0:
    aru = True
    
x = 0
for i in reversed(range(N)):
  x ^= A[i]
  if x == 0:
    aru = True

print('Takahashi' if aru else 'Takanashi')
0