結果

問題 No.1220 yukipoker
ユーザー Kiri8128Kiri8128
提出日時 2020-09-04 21:54:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 457 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,204 KB
実行使用メモリ 78,800 KB
最終ジャッジ日時 2023-08-17 15:32:41
合計ジャッジ時間 4,317 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
77,284 KB
testcase_01 AC 76 ms
77,308 KB
testcase_02 AC 76 ms
77,576 KB
testcase_03 AC 76 ms
77,380 KB
testcase_04 AC 76 ms
77,688 KB
testcase_05 AC 77 ms
77,604 KB
testcase_06 AC 77 ms
77,288 KB
testcase_07 AC 77 ms
77,436 KB
testcase_08 AC 77 ms
77,600 KB
testcase_09 AC 76 ms
77,576 KB
testcase_10 AC 76 ms
77,628 KB
testcase_11 AC 120 ms
78,452 KB
testcase_12 AC 122 ms
78,484 KB
testcase_13 AC 148 ms
78,688 KB
testcase_14 AC 144 ms
78,516 KB
testcase_15 AC 129 ms
78,516 KB
testcase_16 AC 131 ms
78,692 KB
testcase_17 AC 118 ms
78,460 KB
testcase_18 AC 124 ms
78,800 KB
testcase_19 AC 151 ms
78,756 KB
testcase_20 AC 150 ms
78,664 KB
testcase_21 AC 79 ms
77,304 KB
testcase_22 AC 77 ms
77,708 KB
testcase_23 AC 76 ms
77,264 KB
testcase_24 AC 76 ms
77,260 KB
testcase_25 AC 77 ms
77,704 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