結果

問題 No.1351 Sum of GCD Equals LCM
ユーザー tentententen
提出日時 2021-01-18 14:34:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 371 bytes
コンパイル時間 1,956 ms
コンパイル使用メモリ 71,596 KB
実行使用メモリ 56,092 KB
最終ジャッジ日時 2023-08-20 21:49:02
合計ジャッジ時間 11,537 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,956 KB
testcase_01 AC 126 ms
56,072 KB
testcase_02 AC 124 ms
55,808 KB
testcase_03 AC 126 ms
55,848 KB
testcase_04 AC 126 ms
55,656 KB
testcase_05 AC 125 ms
55,952 KB
testcase_06 AC 125 ms
55,984 KB
testcase_07 AC 124 ms
55,440 KB
testcase_08 AC 126 ms
55,908 KB
testcase_09 AC 126 ms
55,924 KB
testcase_10 AC 126 ms
55,808 KB
testcase_11 AC 125 ms
55,848 KB
testcase_12 AC 125 ms
55,648 KB
testcase_13 AC 125 ms
55,892 KB
testcase_14 AC 126 ms
55,720 KB
testcase_15 AC 124 ms
55,756 KB
testcase_16 AC 123 ms
55,824 KB
testcase_17 AC 125 ms
55,924 KB
testcase_18 AC 123 ms
55,500 KB
testcase_19 AC 125 ms
55,984 KB
testcase_20 AC 125 ms
55,916 KB
testcase_21 AC 125 ms
55,504 KB
testcase_22 AC 127 ms
56,024 KB
testcase_23 AC 125 ms
55,736 KB
testcase_24 AC 126 ms
55,496 KB
testcase_25 AC 127 ms
55,960 KB
testcase_26 AC 125 ms
55,988 KB
testcase_27 AC 124 ms
55,668 KB
testcase_28 AC 125 ms
56,092 KB
testcase_29 AC 124 ms
55,836 KB
testcase_30 AC 125 ms
55,944 KB
testcase_31 AC 125 ms
55,984 KB
testcase_32 AC 127 ms
55,700 KB
testcase_33 AC 128 ms
56,084 KB
testcase_34 AC 126 ms
55,656 KB
testcase_35 AC 126 ms
55,852 KB
testcase_36 AC 125 ms
55,792 KB
testcase_37 AC 125 ms
55,644 KB
testcase_38 AC 128 ms
55,704 KB
testcase_39 AC 125 ms
55,720 KB
testcase_40 AC 126 ms
56,012 KB
testcase_41 AC 124 ms
55,960 KB
testcase_42 AC 126 ms
55,752 KB
testcase_43 AC 126 ms
55,872 KB
testcase_44 AC 126 ms
55,492 KB
testcase_45 AC 126 ms
55,940 KB
testcase_46 AC 126 ms
55,956 KB
testcase_47 AC 126 ms
55,708 KB
testcase_48 AC 126 ms
56,036 KB
testcase_49 AC 126 ms
56,084 KB
testcase_50 AC 125 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long value = 1;
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < n; i++) {
		    if (i > 0) {
		        sb.append(" ");
		    }
		    sb.append(value);
		    value *= 2;
		}
	    System.out.println(sb);
	}
}
0