結果

問題 No.1220 yukipoker
ユーザー rlangevinrlangevin
提出日時 2023-02-23 23:16:27
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 501 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 124,476 KB
最終ジャッジ日時 2023-09-30 22:41:28
合計ジャッジ時間 22,908 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,065 ms
116,604 KB
testcase_01 AC 1,098 ms
112,272 KB
testcase_02 AC 1,128 ms
112,356 KB
testcase_03 AC 1,074 ms
112,204 KB
testcase_04 AC 1,104 ms
112,328 KB
testcase_05 AC 1,075 ms
112,572 KB
testcase_06 AC 1,126 ms
112,080 KB
testcase_07 AC 1,107 ms
112,404 KB
testcase_08 AC 1,151 ms
112,348 KB
testcase_09 AC 1,088 ms
112,240 KB
testcase_10 AC 1,074 ms
112,292 KB
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline
from math import log
from decimal import *

Q = int(readline())
mx = 101010
logfact = [1] * (mx + 1)
for i in range(mx):
    logfact[i + 1] = logfact[i] + Decimal(log(i + 1))

for _ in range(Q):
    N, M, K = map(int, readline().split())
    logm = Decimal(log(M))
    if N == K:
        F = logm
    else:
        F = logm + logfact[N] - logfact[K] - logfact[N - K]
    S = K * logm + Decimal(log(N - K + 1))
    print("Flush") if F < S else print("Straight")
0