結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2018-09-20 19:43:41 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 544 bytes |
| コンパイル時間 | 1,375 ms |
| コンパイル使用メモリ | 107,864 KB |
| 実行使用メモリ | 30,228 KB |
| 最終ジャッジ日時 | 2024-07-18 08:36:26 |
| 合計ジャッジ時間 | 1,729 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
コンパイルメッセージ
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