結果

問題 No.2249 GCDistance
ユーザー tailstails
提出日時 2023-03-18 12:54:59
言語 cLay
(20240104-1)
結果
AC  
実行時間 1,118 ms / 5,000 ms
コード長 177 bytes
コンパイル時間 4,123 ms
コンパイル使用メモリ 174,164 KB
実行使用メモリ 83,820 KB
最終ジャッジ日時 2023-10-18 17:14:43
合計ジャッジ時間 19,130 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,086 ms
81,776 KB
testcase_01 AC 1,115 ms
83,820 KB
testcase_02 AC 1,114 ms
83,820 KB
testcase_03 AC 1,118 ms
83,820 KB
testcase_04 AC 1,074 ms
83,356 KB
testcase_05 AC 1,106 ms
83,820 KB
testcase_06 AC 1,104 ms
83,820 KB
testcase_07 AC 1,106 ms
83,820 KB
testcase_08 AC 1,074 ms
81,896 KB
testcase_09 AC 1,114 ms
83,820 KB
testcase_10 AC 1,092 ms
83,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll d[1d7+1]{};
rep(i,2,1d7+1){
	d[i]=i;
}
rep(i,2,1d7+1){
	if(d[i]==i){
		rep(j,i,1d7+1,i){
			d[j]-=d[j]/i;
		}
	}
	d[i]=d[i-1]-d[i]+i*2-2;
}
ll@t;
rep(t){
	ll@n;
	wt(d[n]);
}
0