結果

問題 No.1220 yukipoker
ユーザー titiatitia
提出日時 2020-09-04 22:19:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 557 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-04 23:24:38
合計ジャッジ時間 6,224 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 WA -
testcase_02 AC 26 ms
10,624 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 26 ms
10,752 KB
testcase_07 AC 26 ms
10,624 KB
testcase_08 AC 26 ms
10,624 KB
testcase_09 WA -
testcase_10 AC 26 ms
10,624 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())

def Combi(a,b):# aは大きいが、bは小さいとき,modなし
    if b>a or b<0:
        return 0
    ANS=1
    for i in range(min(b,a-b)):
        ANS=ANS*(a-i)
 
    for i in range(min(b,a-b)):
        ANS=ANS//(min(b,a-b)-i)
 
    return ANS

for i in range(Q):
    N,M,K=map(int,input().split())

    if K<=100:
        if Combi(N,K)*M<(N-K+1)*pow(M,K):
            print("Flush")
        else:
            print("Straight")

    else:        
        if N<M*K:
            print("Flush")
        else:
            print("Straight")
0