結果

問題 No.146 試験監督(1)
ユーザー nCk_cvnCk_cv
提出日時 2016-01-20 17:47:18
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 423 bytes
コンパイル時間 2,091 ms
コンパイル使用メモリ 77,092 KB
実行使用メモリ 72,692 KB
最終ジャッジ日時 2023-10-21 13:35:54
合計ジャッジ時間 6,623 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
import java.io.*;
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long sum = 0L;
		for(int i = 0; i < n; i++) {
			long c = sc.nextLong() % 1000000007;
			long d = sc.nextLong() % 1000000007;
			sum += d * (c/2 + 1 -(c%2==0?1:0)) % 1000000007;
			sum %= 1000000007;
		}
		System.out.println(sum);
		
	}
 }
0