結果
問題 | No.1149 色塗りゲーム |
ユーザー | prd_xxx |
提出日時 | 2020-08-07 21:42:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 173 ms / 2,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 243 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 27,616 KB |
平均クエリ数 | 19.88 |
最終ジャッジ日時 | 2024-07-17 04:27:41 |
合計ジャッジ時間 | 8,720 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
N = int(input()) if N==1: print(1,1) exit() elif N==2: print(2,1) exit() def outin(k,x): print(k,x) t = int(input()) if t < 3: exit() k,x = map(int,input().split()) return (k,x) M = (N+1)//2 k,x = outin(1 if N%2 else 2, M) while 1: if x > M: x -= M if N%2==0: x -= 1 else: x += M if N%2==0: x += 1 k,x = outin(k,x)