結果

問題 No.1220 yukipoker
ユーザー Kiri8128Kiri8128
提出日時 2020-09-04 21:54:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 457 bytes
コンパイル時間 180 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 78,308 KB
最終ジャッジ日時 2024-05-04 22:13:03
合計ジャッジ時間 3,223 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
60,032 KB
testcase_01 AC 45 ms
60,416 KB
testcase_02 AC 42 ms
60,208 KB
testcase_03 AC 40 ms
60,332 KB
testcase_04 AC 40 ms
60,032 KB
testcase_05 AC 46 ms
60,288 KB
testcase_06 AC 45 ms
60,288 KB
testcase_07 AC 47 ms
60,288 KB
testcase_08 AC 44 ms
60,288 KB
testcase_09 AC 45 ms
59,776 KB
testcase_10 AC 44 ms
60,288 KB
testcase_11 AC 91 ms
78,128 KB
testcase_12 AC 100 ms
77,700 KB
testcase_13 AC 114 ms
78,308 KB
testcase_14 AC 104 ms
78,040 KB
testcase_15 AC 100 ms
78,192 KB
testcase_16 AC 98 ms
77,696 KB
testcase_17 AC 86 ms
77,760 KB
testcase_18 AC 86 ms
78,128 KB
testcase_19 AC 103 ms
78,208 KB
testcase_20 AC 109 ms
77,952 KB
testcase_21 AC 43 ms
60,672 KB
testcase_22 AC 42 ms
60,288 KB
testcase_23 AC 43 ms
60,544 KB
testcase_24 AC 44 ms
60,288 KB
testcase_25 AC 43 ms
60,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()
from math import log
nn = 101010
logfa = [0] * (nn+1)
for i in range(nn):
    logfa[i+1] = logfa[i] + log(i + 1)

C = lambda a, b: logfa[a] - logfa[b] - logfa[a-b]

def calc(n, m, k):
    f = C(n, k) + log(m)
    s = log(m) * k + log(n-k+1)
    return 1 if f < s else 0

Q = int(input())
for _ in range(Q):
    N, M, K = map(int, input().split())
    print("Flush" if calc(N, M, K) else "Straight")

0