結果

問題 No.146 試験監督(1)
コンテスト
ユーザー kou6839
提出日時 2015-02-11 00:54:40
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
WA  
実行時間 -
コード長 402 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,616 ms
コンパイル使用メモリ 82,072 KB
実行使用メモリ 62,908 KB
最終ジャッジ日時 2026-03-08 23:36:26
合計ジャッジ時間 4,334 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.math.*;
import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long ans = 0;
        for(int i=0;i<n;i++){
        	long a =sc.nextLong();
        	long b = sc.nextLong();
        	long temp =(a+1)/2*b%1000000007;
        	ans+=temp;
        }
        System.out.println(ans%1000000007);
	}
}
0