結果
| 問題 | No.249 N言っちゃダメゲーム (2) | 
| コンテスト | |
| ユーザー |  tookunn_1213 | 
| 提出日時 | 2015-08-14 21:40:45 | 
| 言語 | Python2 (2.7.18) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 914 ms / 1,000 ms | 
| コード長 | 518 bytes | 
| コンパイル時間 | 65 ms | 
| コンパイル使用メモリ | 6,948 KB | 
| 実行使用メモリ | 8,448 KB | 
| 最終ジャッジ日時 | 2024-07-18 09:29:57 | 
| 合計ジャッジ時間 | 3,295 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
ソースコード
number = 0# 0 -> first, 1 -> second count = 0 N,K = [0 for i in range(1000)],[0 for i in range(1000)] for i in range(1000): N[i],K[i] = map(int,raw_input().split()) for i in range(1000): Fwin = False if N[i] % (K[i] + 1) != 1 and number == 0: count += 1 Fwin = True if N[i] % (K[i] + 1) == 1 and number == 1: count += 1 Fwin = True if Fwin: if(i + 1 < 1000):number = (1 if N[i + 1] % (K[i + 1] + 1) != 1 else 0) else: if(i + 1 < 1000):number = (0 if N[i + 1] % (K[i + 1] + 1) != 1 else 1) print count
