結果
| 問題 | No.148 試験監督(3) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-16 18:38:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 310 bytes |
| 記録 | |
| コンパイル時間 | 203 ms |
| コンパイル使用メモリ | 82,312 KB |
| 実行使用メモリ | 72,184 KB |
| 最終ジャッジ日時 | 2024-07-07 02:27:36 |
| 合計ジャッジ時間 | 4,579 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 11 |
ソースコード
t = int(input())
MOD = int(1e9) + 7
for i_ in range(t):
c, p = list(map(int, input().split(" ")))
if c < 2 * p - 1 or p >= MOD:
print(0)
continue
res = 1
for i in range(c - 2 * p + 2, c - p + 2):
res = res * i % MOD
if res == 0:
break
print(res)