結果

問題 No.970 数列変換マシン
ユーザー Mishan5055Mishan5055
提出日時 2020-04-04 03:50:06
言語 Java19
(openjdk 21)
結果
AC  
実行時間 1,153 ms / 2,000 ms
コード長 472 bytes
コンパイル時間 2,458 ms
コンパイル使用メモリ 73,676 KB
実行使用メモリ 67,584 KB
最終ジャッジ日時 2023-09-16 05:18:13
合計ジャッジ時間 17,827 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,134 ms
67,584 KB
testcase_01 AC 1,151 ms
65,256 KB
testcase_02 AC 1,153 ms
67,220 KB
testcase_03 AC 1,116 ms
65,316 KB
testcase_04 AC 1,106 ms
67,024 KB
testcase_05 AC 1,126 ms
67,032 KB
testcase_06 AC 1,028 ms
66,708 KB
testcase_07 AC 1,123 ms
67,004 KB
testcase_08 AC 1,135 ms
67,052 KB
testcase_09 AC 252 ms
58,820 KB
testcase_10 AC 241 ms
59,360 KB
testcase_11 AC 276 ms
59,720 KB
testcase_12 AC 259 ms
59,588 KB
testcase_13 AC 244 ms
59,572 KB
testcase_14 AC 295 ms
59,852 KB
testcase_15 AC 138 ms
55,988 KB
testcase_16 AC 136 ms
55,492 KB
testcase_17 AC 137 ms
55,608 KB
testcase_18 AC 136 ms
55,880 KB
testcase_19 AC 139 ms
55,988 KB
testcase_20 AC 137 ms
55,836 KB
testcase_21 AC 139 ms
55,796 KB
testcase_22 AC 136 ms
56,280 KB
testcase_23 AC 138 ms
56,068 KB
testcase_24 AC 138 ms
55,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc=new Scanner(System.in);
        int N=sc.nextInt();
        int[] b=new int[N];
        int sum=0;
        
        for(int i=0;i<N;i++){
            b[i]=sc.nextInt();
            sum+=b[i];
        }
        
        for(int i=0;i<N;i++){
            System.out.print((sum-(N-1)*b[i])+" ");
        }
        
        System.out.println();
    }
}
0