結果

問題 No.1220 yukipoker
ユーザー anagohirameanagohirame
提出日時 2020-03-26 15:57:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 309 ms / 2,000 ms
コード長 488 bytes
コンパイル時間 626 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 15,616 KB
最終ジャッジ日時 2023-08-14 09:15:50
合計ジャッジ時間 4,635 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
12,492 KB
testcase_01 AC 42 ms
12,424 KB
testcase_02 AC 43 ms
12,492 KB
testcase_03 AC 43 ms
12,452 KB
testcase_04 AC 42 ms
12,352 KB
testcase_05 AC 42 ms
12,352 KB
testcase_06 AC 43 ms
12,404 KB
testcase_07 AC 42 ms
12,356 KB
testcase_08 AC 42 ms
12,532 KB
testcase_09 AC 43 ms
12,508 KB
testcase_10 AC 42 ms
12,432 KB
testcase_11 AC 159 ms
13,472 KB
testcase_12 AC 169 ms
13,772 KB
testcase_13 AC 303 ms
15,196 KB
testcase_14 AC 297 ms
15,312 KB
testcase_15 AC 204 ms
14,180 KB
testcase_16 AC 231 ms
14,636 KB
testcase_17 AC 148 ms
13,580 KB
testcase_18 AC 182 ms
13,920 KB
testcase_19 AC 307 ms
15,616 KB
testcase_20 AC 309 ms
15,584 KB
testcase_21 AC 42 ms
12,536 KB
testcase_22 AC 42 ms
12,352 KB
testcase_23 AC 42 ms
12,316 KB
testcase_24 AC 42 ms
12,492 KB
testcase_25 AC 43 ms
12,504 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