結果

問題 No.1781 LCM
ユーザー testestesttestestest
提出日時 2021-11-18 00:40:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 298 bytes
コンパイル時間 641 ms
コンパイル使用メモリ 10,804 KB
実行使用メモリ 56,032 KB
最終ジャッジ日時 2023-09-24 15:45:21
合計ジャッジ時間 31,288 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,852 KB
testcase_01 AC 4,231 ms
55,916 KB
testcase_02 AC 4,257 ms
55,664 KB
testcase_03 AC 4,274 ms
55,904 KB
testcase_04 AC 4,291 ms
56,032 KB
testcase_05 AC 4,192 ms
55,956 KB
testcase_06 AC 4,132 ms
55,908 KB
testcase_07 AC 15 ms
7,864 KB
testcase_08 AC 14 ms
7,828 KB
testcase_09 AC 460 ms
17,540 KB
testcase_10 AC 798 ms
17,520 KB
testcase_11 AC 16 ms
7,856 KB
testcase_12 AC 15 ms
7,812 KB
testcase_13 AC 437 ms
17,552 KB
testcase_14 AC 723 ms
17,508 KB
testcase_15 AC 326 ms
12,492 KB
testcase_16 AC 212 ms
10,864 KB
testcase_17 AC 469 ms
13,772 KB
testcase_18 AC 374 ms
13,024 KB
testcase_19 AC 15 ms
7,824 KB
testcase_20 AC 14 ms
7,856 KB
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 15 ms
7,776 KB
testcase_24 AC 14 ms
7,740 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 14 ms
7,816 KB
testcase_32 AC 15 ms
7,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
piyo=[1]*(M+1)
hoge=list(range(M+1))

for p in range(2,M+1):
  if hoge[p]==p:
    for i in range(p,M+1,p):
      neko=0
      while hoge[i]%p==0:
        hoge[i]//=p
        neko+=1
      piyo[i]*=neko+1

print(sum(pow(nyaa,N,998244353) for nyaa in piyo[1:])%998244353)
0