結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
kenkoooo
|
| 提出日時 | 2015-04-06 09:15:13 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 716 bytes |
| コンパイル時間 | 2,696 ms |
| コンパイル使用メモリ | 76,996 KB |
| 実行使用メモリ | 58,956 KB |
| 最終ジャッジ日時 | 2024-07-04 03:18:46 |
| 合計ジャッジ時間 | 6,989 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner koko = new Scanner(System.in);
int n = koko.nextInt();
long[] c = new long[n];
long[] d = new long[n];
for (int i = 0; i < n; i++) {
c[i] = koko.nextLong();
d[i] = koko.nextLong();
}
koko.close();
long total = 0;
System.out.println(total % 1000000007);
long[] t = new long[n];
for (int i = 0; i < n; i++) {
if (c[i] % 2 == 0) {
t[i] = c[i] * d[i] / 2;
t[i] = t[i] % 1000000007;
total = total + t[i];
} else {
t[i] = (c[i] + 1) * d[i] / 2;
t[i] = t[i] % 1000000007;
total = total + t[i];
}
}
System.out.println(total % 1000000007);
}
}
kenkoooo