結果

問題 No.146 試験監督(1)
ユーザー nanophoto12nanophoto12
提出日時 2015-12-17 00:07:09
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 180 ms / 1,000 ms
コード長 554 bytes
コンパイル時間 3,999 ms
コンパイル使用メモリ 106,208 KB
実行使用メモリ 27,984 KB
最終ジャッジ日時 2023-10-14 11:36:47
合計ジャッジ時間 5,357 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 180 ms
26,072 KB
testcase_01 AC 179 ms
27,984 KB
testcase_02 AC 178 ms
25,924 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.Collections.Generic;
using System.Linq;

namespace No236
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			var n = Convert.ToInt32(Console.ReadLine ());
			long sum = 0;
			long mod = 1000000007L;
			for (int i = 0; i < n; i++) {
				var line = Console.ReadLine ().Split (' ').Select (v => Convert.ToInt64 (v)).ToArray ();
				var c = ((line [0] + 1L) / 2L) % mod;
				var d = line [1] % mod;
				var cd = (c * d) % mod;
				sum += cd;
				sum %= mod;
			}
			Console.WriteLine (sum.ToString ());
		}
	}
}
0