結果
| 問題 |
No.1317 月曜日の朝、WAを出した
|
| コンテスト | |
| ユーザー |
xRS43BofaUEZ5gc
|
| 提出日時 | 2021-03-08 11:10:41 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 578 bytes |
| コンパイル時間 | 3,786 ms |
| コンパイル使用メモリ | 74,472 KB |
| 実行使用メモリ | 54,064 KB |
| 最終ジャッジ日時 | 2024-10-09 20:12:45 |
| 合計ジャッジ時間 | 4,962 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 1 RE * 3 |
ソースコード
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 k = sc.nextInt();
int[] ai_Array = new int[n];
long sum = 0;
long sum_bit = 0;
for (int i = 0; i < n; i ++) {
ai_Array[i] = sc.nextInt();
sum_bit += ai_Array[i];
}
sc.close();
for (int i = 0; i < n; i ++ ) {
sum = sum * k + ai_Array[i];
sum %= sum_bit;
}
System.out.println(sum);
}
}
xRS43BofaUEZ5gc