結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-13 17:32:01 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 416 bytes |
| コンパイル時間 | 2,068 ms |
| コンパイル使用メモリ | 73,760 KB |
| 実行使用メモリ | 69,724 KB |
| 最終ジャッジ日時 | 2024-11-29 19:39:28 |
| 合計ジャッジ時間 | 6,594 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 2 TLE * 1 |
ソースコード
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = sc.nextInt();
long max = 0;
for (int i=0; i<n; i++) {
long leng = sc.nextLong();
long num = sc.nextLong();
if (leng%2==0) {
max = (max+(leng/2*num))%1000000007;
}
else {
max = (max+((leng/2+1)*num))%1000000007;
}
}
System.out.println(max);
}
}
Tsukasa_Type