結果
| 問題 | No.153 石の山 |
| コンテスト | |
| ユーザー |
mkawa2
|
| 提出日時 | 2020-01-23 08:51:30 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 5,000 ms |
| コード長 | 407 bytes |
| 記録 | |
| コンパイル時間 | 408 ms |
| コンパイル使用メモリ | 20,568 KB |
| 実行使用メモリ | 35,924 KB |
| 最終ジャッジ日時 | 2026-04-02 05:34:50 |
| 合計ジャッジ時間 | 4,388 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
import sys
sys.setrecursionlimit(10 ** 6)
def II(): return int(sys.stdin.readline())
def main():
def g(x):
if x==1:return 0
if x==2:return 1
ret=set()
d2=x//2
ret.add(g(d2)^g(x-d2))
d3=(x+1)//3
ret.add(g(x-d3*2))
for res in range(3):
if res not in ret:return res
n=II()
if g(n):print("A")
else:print("B")
main()
mkawa2