結果

問題 No.146 試験監督(1)
ユーザー bluemeganebluemegane
提出日時 2018-09-21 07:40:23
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 931 ms / 1,000 ms
コード長 548 bytes
コンパイル時間 2,427 ms
コンパイル使用メモリ 102,256 KB
実行使用メモリ 27,128 KB
最終ジャッジ日時 2023-09-25 10:39:17
合計ジャッジ時間 6,771 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 920 ms
23,116 KB
testcase_01 AC 926 ms
27,104 KB
testcase_02 AC 931 ms
27,128 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.Numerics;

public class Hello
{
    private  const int MOD = 1000000007;
    public static void Main()
    {
        BigInteger ans = 0;
        var n = int.Parse(Console.ReadLine().Trim());
        for (int i = 0; i < n; i++)
        {
            string[] line = Console.ReadLine().Trim().Split(' ');
            BigInteger c = BigInteger.Parse(line[0]);
            BigInteger d = BigInteger.Parse(line[1]);
            ans  += ((c + 1) / 2L) * d;
        }
        ans %= MOD;
        Console.WriteLine(ans);
    }
}
0