結果
問題 | No.970 数列変換マシン |
ユーザー |
|
提出日時 | 2020-04-04 03:50:06 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 1,264 ms / 2,000 ms |
コード長 | 472 bytes |
コンパイル時間 | 2,587 ms |
コンパイル使用メモリ | 76,736 KB |
実行使用メモリ | 70,416 KB |
最終ジャッジ日時 | 2024-07-03 06:49:16 |
合計ジャッジ時間 | 17,783 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
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(); } }