結果

問題 No.1220 yukipoker
ユーザー anagohirameanagohirame
提出日時 2020-03-26 15:57:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 352 ms / 2,000 ms
コード長 488 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 18,048 KB
最終ジャッジ日時 2024-05-01 21:50:57
合計ジャッジ時間 4,807 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
14,848 KB
testcase_01 AC 59 ms
14,720 KB
testcase_02 AC 54 ms
14,848 KB
testcase_03 AC 58 ms
14,848 KB
testcase_04 AC 57 ms
14,848 KB
testcase_05 AC 57 ms
14,848 KB
testcase_06 AC 62 ms
14,848 KB
testcase_07 AC 53 ms
14,848 KB
testcase_08 AC 55 ms
14,848 KB
testcase_09 AC 57 ms
14,848 KB
testcase_10 AC 53 ms
14,720 KB
testcase_11 AC 174 ms
16,128 KB
testcase_12 AC 186 ms
16,128 KB
testcase_13 AC 336 ms
17,792 KB
testcase_14 AC 308 ms
17,920 KB
testcase_15 AC 213 ms
16,640 KB
testcase_16 AC 263 ms
17,024 KB
testcase_17 AC 172 ms
16,000 KB
testcase_18 AC 204 ms
16,256 KB
testcase_19 AC 323 ms
18,048 KB
testcase_20 AC 352 ms
17,920 KB
testcase_21 AC 57 ms
14,848 KB
testcase_22 AC 56 ms
14,720 KB
testcase_23 AC 55 ms
14,592 KB
testcase_24 AC 55 ms
14,848 KB
testcase_25 AC 54 ms
14,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log2
import sys
def input():
	return sys.stdin.readline()[:-1]

log_cum = [0]
for i in range(1, 100001):
	log_cum.append(log_cum[-1] + log2(i))

q = int(input())
ans = []
for _ in range(q):
	n, m, k = map(int, input().split())
	s = (k-1) * log2(m) + log_cum[k] + log_cum[n-k+1]
	f = log_cum[n]

	#l = int(input())
	#print(log(l), log(l+1))
	#print(s, f)
	if s > f:
		ans.append("Flush")
	else:
		ans.append("Straight")
	#else:
		#print("Equivalent")
print(*ans, sep="\n")
0