結果
| 問題 |
No.1389 Clumsy Calculation
|
| コンテスト | |
| ユーザー |
xRS43BofaUEZ5gc
|
| 提出日時 | 2021-03-05 09:32:07 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 846 ms / 2,000 ms |
| コード長 | 390 bytes |
| コンパイル時間 | 3,288 ms |
| コンパイル使用メモリ | 74,836 KB |
| 実行使用メモリ | 68,556 KB |
| 最終ジャッジ日時 | 2024-10-06 04:50:53 |
| 合計ジャッジ時間 | 19,949 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x = sc.nextInt();
int sum = 0;
for (int i=0; i < n; i ++) {
sum += sc.nextInt();
}
sc.close();
System.out.println(- (n - 1) * x + sum);
}
}
xRS43BofaUEZ5gc