結果

問題 No.1220 yukipoker
ユーザー tamatotamato
提出日時 2020-09-04 21:47:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 82,576 KB
実行使用メモリ 78,080 KB
最終ジャッジ日時 2024-11-26 12:28:01
合計ジャッジ時間 3,170 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from math import log
    input = sys.stdin.readline

    cs = [0] * (10**5+1)
    for i in range(1, 10**5+1):
        cs[i] = cs[i-1] + log(i)

    for _ in range(int(input())):
        N, M, K = map(int, input().split())
        F = log(M) + cs[N] - cs[N-K] - cs[K]
        S = log(N-K+1) + K * log(M)
        if F > S:
            print("Straight")
        else:
            print("Flush")


if __name__ == '__main__':
    main()
0