結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
kenkoooo
|
| 提出日時 | 2015-04-06 09:30:38 |
| 言語 | Java (openjdk 23) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 643 bytes |
| コンパイル時間 | 2,038 ms |
| コンパイル使用メモリ | 74,364 KB |
| 実行使用メモリ | 68,608 KB |
| 最終ジャッジ日時 | 2024-07-04 03:19:45 |
| 合計ジャッジ時間 | 6,411 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 TLE * 1 |
ソースコード
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 total = 0;
for (int i = 0; i < n; i++) {
long c = koko.nextLong();
long d = koko.nextLong();
d = d % 1000000007;
if (c % 2 == 0) {
long e = c / 2;
e = e % 1000000007;
long t = e * d;
t = t % 1000000007;
total = total + t;
} else {
long e = (c + 1) / 2;
e = e % 1000000007;
long t = e * d;
t = t % 1000000007;
total = total + t;
}
total = total % 1000000007;
}
System.out.println(total);
}
}
kenkoooo