結果
問題 | No.1220 yukipoker |
ユーザー |
![]() |
提出日時 | 2020-09-05 11:28:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 905 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-11-28 00:07:22 |
合計ジャッジ時間 | 1,955 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 1 |
other | RE * 25 |
ソースコード
import sysimport mathimport collectionsimport bisectimport itertoolsimport decimalimport copyfrom math import log2# import numpy as np# sys.setrecursionlimit(10 ** 6)INF = 10 ** 20# MOD = 10 ** 9 + 7# MOD = 998244353ni = lambda: int(sys.stdin.readline().rstrip())ns = lambda: map(int, sys.stdin.readline().rstrip().split())na = lambda: list(map(int, sys.stdin.readline().rstrip().split()))na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split()))# ===CODE===def main():logfact = [0]for i in range(1, 10 ** 5 + 1):logfact.append(logfact[-1] + math.log(10, i))q = ni()for _ in range(q):n, m, k = ns()f = math.log(10, m) + logfact[n] - logfact[n - k] - logfact[k]s = k * math.log(10, m) + math.log(10, n - k + 1)print("Straight" if s < f else "Flush")if __name__ == '__main__':main()