結果
| 問題 | 
                            No.146 試験監督(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-08-13 14:03:29 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 159 ms / 1,000 ms | 
| コード長 | 487 bytes | 
| コンパイル時間 | 829 ms | 
| コンパイル使用メモリ | 104,576 KB | 
| 実行使用メモリ | 23,040 KB | 
| 最終ジャッジ日時 | 2024-10-13 09:03:58 | 
| 合計ジャッジ時間 | 2,597 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Linq;
class Program {
    static void Main() {
        long ans = 0;
        int n = int.Parse(Console.ReadLine());
        long mod = (long)1e9 + 7;
        for (int i = 0; i < n; i++) {
            long[] cd = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            long cm = (cd[0] + 1) / 2 % mod;
            long dm = cd[1] % mod;
            ans += cm * dm % mod;
            ans %= mod;
        }
        Console.WriteLine(ans);
    }
}