結果
| 問題 | No.146 試験監督(1) |
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2018-09-20 19:43:41 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 544 bytes |
| 記録 | |
| コンパイル時間 | 776 ms |
| コンパイル使用メモリ | 110,964 KB |
| 実行使用メモリ | 141,968 KB |
| 最終ジャッジ日時 | 2026-04-02 00:24:55 |
| 合計ジャッジ時間 | 1,451 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 2 MLE * 1 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Hello
{
public const int 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]);
var d = long.Parse(line[1]);
if (c % 2 == 0) ans += c / 2L * d;
else ans += (c + 1) / 2L * d;
ans %= MOD;
}
Console.WriteLine(ans);
}
}
bluemegane