結果

問題 No.146 試験監督(1)
コンテスト
ユーザー kenkoooo
提出日時 2015-04-06 09:15:13
言語 Java
(openjdk 26.0.2.1 + ACL)
コンパイル:
javac -J-Duser.language=en -encoding UTF8 -cp /opt/aclib/ac_library.jar _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true -cp .:/opt/aclib/ac_library.jar _class_
結果
WA  
実行時間 -
コード長 716 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,279 ms
コンパイル使用メモリ 84,124 KB
実行使用メモリ 59,252 KB
最終ジャッジ日時 2026-08-05 22:25:15
合計ジャッジ時間 4,569 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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);
	}
}
0