結果

問題 No.1351 Sum of GCD Equals LCM
ユーザー tentententen
提出日時 2023-11-21 11:47:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 1,673 bytes
コンパイル時間 4,149 ms
コンパイル使用メモリ 84,528 KB
実行使用メモリ 54,892 KB
最終ジャッジ日時 2023-11-21 11:47:52
合計ジャッジ時間 9,215 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
54,648 KB
testcase_01 AC 67 ms
54,656 KB
testcase_02 AC 68 ms
54,796 KB
testcase_03 AC 67 ms
54,768 KB
testcase_04 AC 66 ms
54,752 KB
testcase_05 AC 67 ms
54,640 KB
testcase_06 AC 66 ms
54,644 KB
testcase_07 AC 68 ms
54,748 KB
testcase_08 AC 69 ms
54,788 KB
testcase_09 AC 67 ms
54,644 KB
testcase_10 AC 67 ms
54,676 KB
testcase_11 AC 66 ms
54,644 KB
testcase_12 AC 67 ms
54,648 KB
testcase_13 AC 69 ms
54,748 KB
testcase_14 AC 69 ms
54,760 KB
testcase_15 AC 69 ms
54,644 KB
testcase_16 AC 67 ms
54,792 KB
testcase_17 AC 68 ms
54,648 KB
testcase_18 AC 68 ms
54,648 KB
testcase_19 AC 69 ms
54,752 KB
testcase_20 AC 68 ms
54,884 KB
testcase_21 AC 68 ms
54,644 KB
testcase_22 AC 68 ms
54,752 KB
testcase_23 AC 68 ms
54,764 KB
testcase_24 AC 68 ms
54,640 KB
testcase_25 AC 68 ms
54,760 KB
testcase_26 AC 70 ms
54,784 KB
testcase_27 AC 67 ms
54,880 KB
testcase_28 AC 68 ms
54,888 KB
testcase_29 AC 68 ms
54,876 KB
testcase_30 AC 69 ms
54,892 KB
testcase_31 AC 68 ms
54,760 KB
testcase_32 AC 71 ms
54,848 KB
testcase_33 AC 69 ms
54,648 KB
testcase_34 AC 70 ms
52,816 KB
testcase_35 AC 68 ms
54,644 KB
testcase_36 AC 68 ms
54,676 KB
testcase_37 AC 68 ms
54,788 KB
testcase_38 AC 68 ms
54,764 KB
testcase_39 AC 68 ms
54,644 KB
testcase_40 AC 69 ms
54,640 KB
testcase_41 AC 69 ms
54,752 KB
testcase_42 AC 68 ms
54,760 KB
testcase_43 AC 68 ms
54,764 KB
testcase_44 AC 67 ms
54,640 KB
testcase_45 AC 68 ms
54,760 KB
testcase_46 AC 68 ms
54,644 KB
testcase_47 AC 68 ms
54,892 KB
testcase_48 AC 68 ms
54,880 KB
testcase_49 AC 68 ms
54,648 KB
testcase_50 AC 67 ms
54,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;
import java.util.stream.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        int n = sc.nextInt();
        long[] ans = new long[n];
        for (int i = 0; i < n; i++) {
            ans[i] = (1L << i);
        }
        System.out.println(String.join(" ", Arrays.stream(ans).mapToObj(String::valueOf).toArray(String[]::new)));
    }
}
class Utilities {
    static String arrayToLineString(Object[] arr) {
        return Arrays.stream(arr).map(x -> x.toString()).collect(Collectors.joining("\n"));
    }
    
    static String arrayToLineString(int[] arr) {
        return String.join("\n", Arrays.stream(arr).mapToObj(String::valueOf).toArray(String[]::new));
    }
}
class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    StringBuilder sb = new StringBuilder();
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }
    
    public int[] nextIntArray() throws Exception {
        return Stream.of(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
    }
    
    public String next() throws Exception {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    
}
0