結果

問題 No.2610 Decreasing LCMs
ユーザー 👑 ygussanyygussany
提出日時 2024-01-19 21:31:50
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 344 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 29,056 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2024-01-19 21:31:51
合計ジャッジ時間 1,184 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,548 KB
testcase_01 AC 1 ms
6,548 KB
testcase_02 AC 1 ms
6,548 KB
testcase_03 AC 1 ms
6,548 KB
testcase_04 AC 1 ms
6,548 KB
testcase_05 AC 1 ms
6,548 KB
testcase_06 AC 1 ms
6,548 KB
testcase_07 AC 1 ms
6,548 KB
testcase_08 AC 1 ms
6,548 KB
testcase_09 AC 1 ms
6,548 KB
testcase_10 AC 1 ms
6,548 KB
testcase_11 AC 1 ms
6,548 KB
testcase_12 AC 1 ms
6,548 KB
testcase_13 AC 1 ms
6,548 KB
testcase_14 AC 1 ms
6,548 KB
testcase_15 AC 1 ms
6,548 KB
testcase_16 AC 1 ms
6,548 KB
testcase_17 AC 1 ms
6,548 KB
testcase_18 AC 1 ms
6,548 KB
testcase_19 AC 1 ms
6,548 KB
testcase_20 AC 1 ms
6,548 KB
testcase_21 AC 1 ms
6,548 KB
testcase_22 AC 1 ms
6,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main()
{
	int N;
	scanf("%d", &N);
	
	int i, bit[26];
	for (i = 1, bit[0] = 1; i <= 25; i++) bit[i] = bit[i-1] << 1;
	
	int x, ans[26];
	for (i = 1, x = bit[25]; i <= N; i++) {
		ans[N-i+1] = x;
		if (i < N) x -= bit[24-i];
	}
	for (i = 1; i <= N; i++) printf("%d ", ans[i]);
	printf("\n");
	fflush(stdout);
	return 0;
}
0