結果
問題 | No.1529 Constant Lcm |
ユーザー | mono_0812 |
提出日時 | 2021-06-04 20:30:37 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,215 bytes |
コンパイル時間 | 136 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 53,120 KB |
最終ジャッジ日時 | 2024-04-29 23:55:24 |
合計ジャッジ時間 | 5,631 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 39 ms
17,408 KB |
testcase_01 | AC | 45 ms
11,904 KB |
testcase_02 | AC | 38 ms
11,904 KB |
testcase_03 | AC | 39 ms
11,904 KB |
testcase_04 | AC | 39 ms
11,904 KB |
testcase_05 | AC | 39 ms
11,904 KB |
testcase_06 | AC | 39 ms
11,904 KB |
testcase_07 | AC | 39 ms
12,032 KB |
testcase_08 | AC | 39 ms
11,776 KB |
testcase_09 | AC | 40 ms
11,776 KB |
testcase_10 | TLE | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
ソースコード
import bisect,collections,copy,heapq,itertools,math,string,sys,queue,time input = lambda: sys.stdin.readline().rstrip() def I(): return input() def IS(): return input().split() def II(): return int(input()) def IIS(): return map(int,input().split()) def LIIS(): return list(map(int,input().split())) def debug(*args): print(*args) if len(args)>0 else print(False);return start_time=time.time() def nt(): print(time.time()-start_time);return def chmax(a: list, b: list) -> bool: assert len(a) == len(b) == 1, "1要素のlistを指定してください" if a[0] < b[0]: a[0] = b[0] return True return False def chmin(a: list, b: list) -> bool: assert len(a) == len(b) == 1, "1要素のlistを指定してください" if a[0] > b[0]: a[0] = b[0] return True return False def combinations_count(n, r): return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) ragen=range INF=10**10 MOD=998244353 from decimal import Decimal as d ############################################################################## n=II() A=[] for i in range(n-1): A.append((i+1)*(n-i-1)) ans=1 for i in range(n-1): ans=math.lcm(ans,A[i]) print(ans%MOD)