結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
chiho_miyako
|
| 提出日時 | 2015-04-06 09:14:53 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 780 bytes |
| コンパイル時間 | 1,917 ms |
| コンパイル使用メモリ | 74,072 KB |
| 実行使用メモリ | 71,820 KB |
| 最終ジャッジ日時 | 2024-07-04 03:18:53 |
| 合計ジャッジ時間 | 6,000 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
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[] c = new long[n];
long[] d = new long[n];
for(int i = 0; i<n; i++){
c[i] = koko.nextLong();
d[i] = koko.nextLong();
}
long total = 0;
long[] t = new long[n];
for(int i =0; i<n; i++){
if(i%2==0){
t[i] = c[i]*d[i]/2;
t[i] = t[i]%1000000007;
total = total + t[i];
}else{
t[i] = (c[i]+1)*d[i]/2;
t[i] = t[i]%1000000007;
total = total + t[i];
}
}
System.out.println(total);
}
}
chiho_miyako