結果

問題 No.1220 yukipoker
ユーザー rlangevin
提出日時 2023-02-23 23:14:58
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 534 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 82,488 KB
実行使用メモリ 115,564 KB
最終ジャッジ日時 2024-07-23 16:24:33
合計ジャッジ時間 22,282 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10 TLE * 3 -- * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline
from math import log
from decimal import *

Q = int(readline())
mx = 101010
logfact = [1] * (mx + 1)
for i in range(mx):
    logfact[i + 1] = logfact[i] + Decimal(log(i + 1))

for _ in range(Q):
    N, M, K = map(int, readline().split())
    if N == K:
        F = Decimal(log(M))
    else:
        F = Decimal(log(M)) + Decimal(logfact[N]) - Decimal(logfact[K]) - Decimal(logfact[N - K])
    S = K * Decimal(log(M)) + Decimal(log(N - K + 1))
    print("Flush") if F < S else print("Straight")
0