結果

問題 No.1220 yukipoker
ユーザー 👑 rin204rin204
提出日時 2022-11-03 00:42:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 378 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 87,044 KB
実行使用メモリ 92,144 KB
最終ジャッジ日時 2023-09-24 11:24:49
合計ジャッジ時間 6,327 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
90,140 KB
testcase_01 AC 96 ms
89,940 KB
testcase_02 AC 93 ms
90,252 KB
testcase_03 AC 95 ms
90,036 KB
testcase_04 AC 94 ms
89,968 KB
testcase_05 AC 94 ms
90,164 KB
testcase_06 AC 93 ms
90,064 KB
testcase_07 AC 94 ms
90,184 KB
testcase_08 AC 93 ms
89,964 KB
testcase_09 AC 94 ms
89,984 KB
testcase_10 AC 91 ms
90,128 KB
testcase_11 AC 239 ms
92,000 KB
testcase_12 AC 247 ms
91,964 KB
testcase_13 AC 369 ms
91,920 KB
testcase_14 AC 358 ms
91,720 KB
testcase_15 AC 277 ms
91,924 KB
testcase_16 AC 307 ms
91,948 KB
testcase_17 AC 233 ms
92,144 KB
testcase_18 AC 262 ms
92,024 KB
testcase_19 AC 378 ms
91,916 KB
testcase_20 AC 369 ms
92,032 KB
testcase_21 AC 98 ms
90,144 KB
testcase_22 AC 98 ms
90,148 KB
testcase_23 AC 98 ms
89,876 KB
testcase_24 AC 96 ms
89,884 KB
testcase_25 AC 97 ms
90,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log

N = 200000
fact = [0]
for i in range(1, N):
    fact.append(fact[-1] + log(i))

def flush(n, m, k):
    return fact[n] - fact[k] - fact[n - k] + log(m)

def straight(n, m, k):
    return k * log(m) + log(n - k + 1)

for _ in range(int(input())):
    n, m, k = map(int, input().split())
    if flush(n, m, k) < straight(n, m, k):
        print("Flush")
    else:
        print("Straight")
0