結果

問題 No.2211 Frequency Table of GCD
ユーザー tailstails
提出日時 2023-02-11 03:30:37
言語 cLay
(20240104-1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 227 bytes
コンパイル時間 2,353 ms
コンパイル使用メモリ 172,124 KB
実行使用メモリ 7,276 KB
最終ジャッジ日時 2023-09-22 03:18:16
合計ジャッジ時間 5,251 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 10 ms
5,848 KB
testcase_04 AC 17 ms
5,780 KB
testcase_05 AC 23 ms
6,416 KB
testcase_06 AC 20 ms
6,092 KB
testcase_07 AC 26 ms
6,792 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 3 ms
4,376 KB
testcase_11 AC 3 ms
4,380 KB
testcase_12 AC 4 ms
4,376 KB
testcase_13 AC 16 ms
5,604 KB
testcase_14 AC 19 ms
6,292 KB
testcase_15 AC 16 ms
5,920 KB
testcase_16 AC 18 ms
6,152 KB
testcase_17 AC 23 ms
6,444 KB
testcase_18 AC 31 ms
7,256 KB
testcase_19 AC 32 ms
7,268 KB
testcase_20 AC 32 ms
7,276 KB
testcase_21 AC 32 ms
7,220 KB
testcase_22 AC 32 ms
7,268 KB
testcase_23 AC 11 ms
6,064 KB
testcase_24 AC 16 ms
7,080 KB
testcase_25 AC 3 ms
4,376 KB
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 18 ms
7,244 KB
testcase_28 AC 16 ms
7,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
ll@n,@m,c[m+1]{};
Mint d[m+1];
rep(n){
	ll@a;
	++c[a];
}
rep(i,1,m+1){
	long v=0;
	rep(j,i,m+1,i){
		v+=c[j];
	}
	d[i]=Mint(2)**v-1;
}
rrep(i,1,m+1){
	rep(j,i*2,m+1,i){
		d[i]-=d[j];
	}
}
wtLn(((d+1))(m));
0