結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
koukonko
|
| 提出日時 | 2015-12-12 16:25:21 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 614 bytes |
| コンパイル時間 | 1,873 ms |
| コンパイル使用メモリ | 75,176 KB |
| 実行使用メモリ | 57,572 KB |
| 最終ジャッジ日時 | 2024-09-15 08:44:47 |
| 合計ジャッジ時間 | 3,901 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
try {
int count = Integer.parseInt(read.readLine());
long ans = 0;
while (count-- > 0) {
String[] box = read.readLine().split(" ");
int add = 0;
if((Long.parseLong(box[0]) % 2) == 1){
add = 1;
}
ans += ((Long.parseLong(box[0]) / 2) + add) * Long.parseLong(box[1]);
}
System.out.println(ans % 1000000007);
} catch (Exception e) {
e.printStackTrace();
}
}
}
koukonko