結果

問題 No.1351 Sum of GCD Equals LCM
ユーザー ks2mks2m
提出日時 2021-01-17 13:12:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 3,676 ms
コンパイル使用メモリ 72,632 KB
実行使用メモリ 56,640 KB
最終ジャッジ日時 2023-08-19 19:17:41
合計ジャッジ時間 13,727 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,132 KB
testcase_01 AC 123 ms
56,020 KB
testcase_02 AC 128 ms
55,712 KB
testcase_03 AC 121 ms
55,800 KB
testcase_04 AC 121 ms
55,708 KB
testcase_05 AC 120 ms
55,744 KB
testcase_06 AC 119 ms
53,520 KB
testcase_07 AC 120 ms
53,912 KB
testcase_08 AC 125 ms
55,940 KB
testcase_09 AC 119 ms
55,804 KB
testcase_10 AC 119 ms
55,716 KB
testcase_11 AC 121 ms
56,232 KB
testcase_12 AC 120 ms
55,608 KB
testcase_13 AC 119 ms
55,972 KB
testcase_14 AC 121 ms
55,712 KB
testcase_15 AC 120 ms
55,996 KB
testcase_16 AC 119 ms
55,480 KB
testcase_17 AC 120 ms
56,004 KB
testcase_18 AC 119 ms
55,812 KB
testcase_19 AC 120 ms
55,540 KB
testcase_20 AC 120 ms
55,648 KB
testcase_21 AC 121 ms
55,916 KB
testcase_22 AC 119 ms
55,988 KB
testcase_23 AC 121 ms
55,748 KB
testcase_24 AC 121 ms
56,012 KB
testcase_25 AC 120 ms
55,948 KB
testcase_26 AC 121 ms
55,896 KB
testcase_27 AC 122 ms
55,712 KB
testcase_28 AC 122 ms
55,824 KB
testcase_29 AC 124 ms
55,752 KB
testcase_30 AC 121 ms
55,896 KB
testcase_31 AC 122 ms
56,200 KB
testcase_32 AC 121 ms
55,652 KB
testcase_33 AC 122 ms
55,468 KB
testcase_34 AC 120 ms
55,756 KB
testcase_35 AC 122 ms
55,836 KB
testcase_36 AC 123 ms
56,068 KB
testcase_37 AC 121 ms
55,956 KB
testcase_38 AC 121 ms
55,968 KB
testcase_39 AC 122 ms
56,216 KB
testcase_40 AC 121 ms
55,960 KB
testcase_41 AC 118 ms
55,880 KB
testcase_42 AC 120 ms
55,916 KB
testcase_43 AC 120 ms
56,640 KB
testcase_44 AC 120 ms
55,520 KB
testcase_45 AC 120 ms
55,528 KB
testcase_46 AC 121 ms
55,712 KB
testcase_47 AC 120 ms
55,752 KB
testcase_48 AC 122 ms
55,756 KB
testcase_49 AC 121 ms
55,728 KB
testcase_50 AC 121 ms
55,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		long b = 1;
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < n; i++) {
			sb.append(b).append(' ');
			b *= 2;
		}
		sb.deleteCharAt(sb.length() - 1);
		System.out.println(sb.toString());
	}
}
0