結果

問題 No.1220 yukipoker
ユーザー 👑 tamatotamato
提出日時 2020-09-04 21:47:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 495 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 87,592 KB
実行使用メモリ 79,228 KB
最終ジャッジ日時 2023-08-17 15:23:07
合計ジャッジ時間 4,398 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
77,592 KB
testcase_01 AC 82 ms
77,664 KB
testcase_02 AC 80 ms
77,576 KB
testcase_03 AC 80 ms
77,480 KB
testcase_04 AC 79 ms
77,648 KB
testcase_05 AC 81 ms
77,440 KB
testcase_06 AC 79 ms
77,504 KB
testcase_07 AC 80 ms
77,656 KB
testcase_08 AC 82 ms
77,584 KB
testcase_09 AC 80 ms
77,480 KB
testcase_10 AC 79 ms
77,660 KB
testcase_11 AC 120 ms
79,188 KB
testcase_12 AC 121 ms
79,164 KB
testcase_13 AC 141 ms
78,892 KB
testcase_14 AC 140 ms
79,100 KB
testcase_15 AC 128 ms
79,164 KB
testcase_16 AC 132 ms
79,228 KB
testcase_17 AC 119 ms
78,980 KB
testcase_18 AC 123 ms
79,036 KB
testcase_19 AC 144 ms
79,132 KB
testcase_20 AC 145 ms
78,968 KB
testcase_21 AC 80 ms
77,576 KB
testcase_22 AC 80 ms
77,352 KB
testcase_23 AC 81 ms
77,540 KB
testcase_24 AC 79 ms
77,536 KB
testcase_25 AC 80 ms
77,476 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