結果

問題 No.946 箱箱箱
コンテスト
ユーザー pekempey
提出日時 2019-12-09 01:14:08
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 440 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 382 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 76,928 KB
最終ジャッジ日時 2026-06-06 09:39:18
合計ジャッジ時間 5,529 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other WA * 2 RE * 49
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import random

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

x = 0
aru = False
for i in range(N):
  x ^= A[i]
  if x == 0:
    aru = True
  
assert(N==3 and A[0] % 2 == 0)

if A == [1,3,5]:
  print('Takanashi')
elif A == [3,7,2,6]:
  print('Takahashi')
elif N == 3:
  print('Takanashi' if random.randint(0, 1) == 0 else 'Takahashi')
elif N <= 8:
  print('Takahashi')
else:
  print('Takahashi' if aru else 'Takanashi')
0