結果

問題 No.146 試験監督(1)
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-09-25 21:42:00
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 148 ms / 1,000 ms
コード長 479 bytes
コンパイル時間 2,034 ms
コンパイル使用メモリ 106,112 KB
実行使用メモリ 23,296 KB
最終ジャッジ日時 2024-04-15 21:14:03
合計ジャッジ時間 2,419 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
23,040 KB
testcase_01 AC 146 ms
23,296 KB
testcase_02 AC 148 ms
23,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

class No146
{
    static void Main()
    {
        var count = Int64.Parse(Console.ReadLine());
        var mod = 1000000007;
        long ans = 0;
        for (long i = 0; i < count; ++i)
        {
            var chair = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
            var p = ((chair[0]+1)/2)%mod;
            ans += p * (chair[1]%mod);
            ans %= mod;
        }
        Console.WriteLine(ans);
    }
}
0