結果
| 問題 |
No.1220 yukipoker
|
| コンテスト | |
| ユーザー |
qumazaki
|
| 提出日時 | 2020-09-05 01:12:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 133 ms / 2,000 ms |
| コード長 | 545 bytes |
| コンパイル時間 | 160 ms |
| コンパイル使用メモリ | 82,816 KB |
| 実行使用メモリ | 126,976 KB |
| 最終ジャッジ日時 | 2024-11-26 21:25:53 |
| 合計ジャッジ時間 | 3,159 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import math
q = int(readline())
data = list(map(int,read().split()))
fr_log = [0] * (10**5+10)
for i in range(2,10**5+10):
fr_log[i] = fr_log[i-1] + math.log(i)
ans = []
it = iter(data)
for n,m,k in zip(it,it,it):
fn = math.log(m) + fr_log[n] - fr_log[n-k] - fr_log[k]
sn = math.log(n-k+1) + k*math.log(m)
if(fn < sn):
ans.append('Flush')
else:
ans.append('Straight')
print('\n'.join(ans))
qumazaki