結果
問題 | No.146 試験監督(1) |
ユーザー | koukonko |
提出日時 | 2015-12-12 16:25:21 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 614 bytes |
コンパイル時間 | 1,862 ms |
コンパイル使用メモリ | 71,452 KB |
実行使用メモリ | 57,596 KB |
最終ジャッジ日時 | 2023-10-13 11:47:36 |
合計ジャッジ時間 | 3,965 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
ソースコード
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(); } } }