結果

問題 No.1220 yukipoker
ユーザー tamatotamato
提出日時 2020-09-04 21:47:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 199 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 78,056 KB
最終ジャッジ日時 2024-05-04 22:02:51
合計ジャッジ時間 2,903 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
61,144 KB
testcase_01 AC 39 ms
59,804 KB
testcase_02 AC 47 ms
60,196 KB
testcase_03 AC 45 ms
60,608 KB
testcase_04 AC 42 ms
61,540 KB
testcase_05 AC 40 ms
60,196 KB
testcase_06 AC 44 ms
60,320 KB
testcase_07 AC 40 ms
60,516 KB
testcase_08 AC 40 ms
60,292 KB
testcase_09 AC 43 ms
60,588 KB
testcase_10 AC 42 ms
60,060 KB
testcase_11 AC 79 ms
77,964 KB
testcase_12 AC 81 ms
77,684 KB
testcase_13 AC 100 ms
77,828 KB
testcase_14 AC 95 ms
77,832 KB
testcase_15 AC 83 ms
77,804 KB
testcase_16 AC 88 ms
77,680 KB
testcase_17 AC 77 ms
77,896 KB
testcase_18 AC 84 ms
78,056 KB
testcase_19 AC 111 ms
78,036 KB
testcase_20 AC 108 ms
77,608 KB
testcase_21 AC 46 ms
60,668 KB
testcase_22 AC 45 ms
60,636 KB
testcase_23 AC 41 ms
60,456 KB
testcase_24 AC 42 ms
61,768 KB
testcase_25 AC 43 ms
60,972 KB
権限があれば一括ダウンロードができます

ソースコード

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