結果

問題 No.1220 yukipoker
ユーザー mkawa2mkawa2
提出日時 2021-07-15 09:08:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 339 ms / 2,000 ms
コード長 1,037 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,980 KB
実行使用メモリ 12,508 KB
最終ジャッジ日時 2023-09-17 14:01:48
合計ジャッジ時間 5,109 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
12,452 KB
testcase_01 AC 52 ms
12,428 KB
testcase_02 AC 52 ms
12,368 KB
testcase_03 AC 52 ms
12,436 KB
testcase_04 AC 55 ms
12,504 KB
testcase_05 AC 51 ms
12,428 KB
testcase_06 AC 51 ms
12,372 KB
testcase_07 AC 51 ms
12,372 KB
testcase_08 AC 52 ms
12,508 KB
testcase_09 AC 53 ms
12,436 KB
testcase_10 AC 52 ms
12,384 KB
testcase_11 AC 182 ms
12,344 KB
testcase_12 AC 189 ms
12,460 KB
testcase_13 AC 336 ms
12,356 KB
testcase_14 AC 326 ms
12,400 KB
testcase_15 AC 227 ms
12,364 KB
testcase_16 AC 254 ms
12,332 KB
testcase_17 AC 167 ms
12,456 KB
testcase_18 AC 200 ms
12,420 KB
testcase_19 AC 339 ms
12,372 KB
testcase_20 AC 338 ms
12,408 KB
testcase_21 AC 52 ms
12,372 KB
testcase_22 AC 51 ms
12,372 KB
testcase_23 AC 51 ms
12,504 KB
testcase_24 AC 51 ms
12,456 KB
testcase_25 AC 51 ms
12,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = 10**16
md = 998244353
# md = 10**9+7

from math import log

def nCr(com_n, com_r):
    if com_r < 0: return 0
    if com_n < com_r: return 0
    return fac[com_n]-fac[com_r]-fac[com_n-com_r]

# 準備
n_max = 100005
fac = [0]
for i in range(1, n_max+1): fac.append(fac[-1]+log(i))

def solve():
    n, m, k = LI()
    f = nCr(n, k)+log(m)
    s = log(n-k+1)+k*log(m)
    if f < s: print("Flush")
    else: print("Straight")

for _ in range(II()):
    solve()
0