結果

問題 No.1351 Sum of GCD Equals LCM
ユーザー ks2mks2m
提出日時 2021-01-17 13:12:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 2,466 ms
コンパイル使用メモリ 74,716 KB
実行使用メモリ 41,516 KB
最終ジャッジ日時 2024-05-07 02:13:12
合計ジャッジ時間 11,726 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
40,084 KB
testcase_01 AC 103 ms
39,788 KB
testcase_02 AC 111 ms
41,084 KB
testcase_03 AC 113 ms
40,216 KB
testcase_04 AC 111 ms
40,380 KB
testcase_05 AC 120 ms
41,516 KB
testcase_06 AC 107 ms
41,116 KB
testcase_07 AC 99 ms
39,672 KB
testcase_08 AC 102 ms
40,056 KB
testcase_09 AC 101 ms
39,796 KB
testcase_10 AC 117 ms
40,812 KB
testcase_11 AC 104 ms
39,668 KB
testcase_12 AC 119 ms
41,420 KB
testcase_13 AC 110 ms
41,252 KB
testcase_14 AC 104 ms
41,112 KB
testcase_15 AC 107 ms
40,688 KB
testcase_16 AC 107 ms
40,696 KB
testcase_17 AC 104 ms
40,644 KB
testcase_18 AC 105 ms
39,688 KB
testcase_19 AC 102 ms
39,952 KB
testcase_20 AC 99 ms
39,700 KB
testcase_21 AC 105 ms
39,964 KB
testcase_22 AC 109 ms
40,696 KB
testcase_23 AC 106 ms
40,840 KB
testcase_24 AC 98 ms
39,952 KB
testcase_25 AC 108 ms
41,044 KB
testcase_26 AC 104 ms
39,688 KB
testcase_27 AC 107 ms
41,020 KB
testcase_28 AC 107 ms
39,804 KB
testcase_29 AC 118 ms
40,896 KB
testcase_30 AC 107 ms
40,016 KB
testcase_31 AC 106 ms
39,672 KB
testcase_32 AC 109 ms
41,208 KB
testcase_33 AC 119 ms
40,820 KB
testcase_34 AC 122 ms
41,084 KB
testcase_35 AC 115 ms
40,692 KB
testcase_36 AC 118 ms
41,096 KB
testcase_37 AC 119 ms
41,052 KB
testcase_38 AC 113 ms
40,928 KB
testcase_39 AC 110 ms
40,708 KB
testcase_40 AC 119 ms
41,060 KB
testcase_41 AC 113 ms
40,936 KB
testcase_42 AC 117 ms
41,000 KB
testcase_43 AC 123 ms
40,916 KB
testcase_44 AC 118 ms
40,948 KB
testcase_45 AC 116 ms
40,784 KB
testcase_46 AC 121 ms
41,072 KB
testcase_47 AC 116 ms
41,072 KB
testcase_48 AC 119 ms
40,820 KB
testcase_49 AC 106 ms
40,796 KB
testcase_50 AC 110 ms
40,744 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