結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
nCk_cv
|
| 提出日時 | 2016-01-20 17:47:18 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 423 bytes |
| コンパイル時間 | 1,996 ms |
| コンパイル使用メモリ | 78,964 KB |
| 実行使用メモリ | 58,512 KB |
| 最終ジャッジ日時 | 2024-09-21 14:50:48 |
| 合計ジャッジ時間 | 6,570 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 2 TLE * 1 |
ソースコード
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);
}
}
nCk_cv