結果

問題 No.146 試験監督(1)
ユーザー bluemeganebluemegane
提出日時 2018-09-20 20:01:05
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 562 bytes
コンパイル時間 2,062 ms
コンパイル使用メモリ 98,260 KB
実行使用メモリ 26,876 KB
最終ジャッジ日時 2023-09-25 10:36:18
合計ジャッジ時間 3,384 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

using System;

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