結果

問題 No.146 試験監督(1)
ユーザー Mcpu3Mcpu3
提出日時 2018-08-10 16:17:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 864 ms / 1,000 ms
コード長 326 bytes
コンパイル時間 1,944 ms
コンパイル使用メモリ 74,140 KB
実行使用メモリ 72,660 KB
最終ジャッジ日時 2023-10-24 13:23:08
合計ジャッジ時間 6,127 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 859 ms
71,596 KB
testcase_01 AC 864 ms
71,416 KB
testcase_02 AC 856 ms
72,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		long n=stdIn.nextLong(),c,d,s=0,i;
		for(i=0;i<n;i++) {
			c=stdIn.nextLong();
			d=stdIn.nextLong();
			s=(s+((c+1)/2%1000000007)*(d%1000000007))%1000000007;
		}
		System.out.print(s);
	}
}
0