結果

問題 No.1220 yukipoker
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-22 01:58:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 440 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 81,688 KB
実行使用メモリ 85,628 KB
最終ジャッジ日時 2023-10-21 12:22:01
合計ジャッジ時間 6,019 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
70,788 KB
testcase_01 AC 53 ms
70,788 KB
testcase_02 AC 54 ms
70,788 KB
testcase_03 AC 53 ms
70,788 KB
testcase_04 AC 54 ms
70,788 KB
testcase_05 AC 53 ms
70,788 KB
testcase_06 AC 54 ms
70,788 KB
testcase_07 AC 53 ms
70,788 KB
testcase_08 AC 53 ms
70,788 KB
testcase_09 AC 53 ms
70,788 KB
testcase_10 AC 53 ms
70,788 KB
testcase_11 AC 115 ms
85,080 KB
testcase_12 AC 117 ms
85,096 KB
testcase_13 AC 151 ms
85,364 KB
testcase_14 AC 148 ms
85,364 KB
testcase_15 AC 123 ms
85,100 KB
testcase_16 AC 132 ms
85,364 KB
testcase_17 AC 111 ms
85,100 KB
testcase_18 AC 120 ms
85,100 KB
testcase_19 AC 151 ms
85,628 KB
testcase_20 AC 152 ms
85,516 KB
testcase_21 AC 54 ms
70,808 KB
testcase_22 AC 54 ms
70,808 KB
testcase_23 AC 53 ms
70,808 KB
testcase_24 AC 54 ms
70,808 KB
testcase_25 AC 54 ms
70,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate
import math
U = 10 ** 5 + 10

log = [0] + [math.log10(i) for i in range(1, U + 1)]
log_acc = list(accumulate(log))


def test():
    N, M, K = map(int, input().split())
    f = log[M] + (log_acc[N]-log_acc[N-K]) - log_acc[K]
    s = K * log[M] + log[N - K + 1]
    if f > s:
        return "Straight"
    else:
        return "Flush"


Q = int(input())
ans = [test() for _ in range(Q)]
print("\n".join(ans))
0