結果
| 問題 | 
                            No.146 試験監督(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             nanophoto12
                         | 
                    
| 提出日時 | 2015-12-17 00:07:09 | 
| 言語 | C#(csc)  (csc 3.9.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 149 ms / 1,000 ms | 
| コード長 | 554 bytes | 
| コンパイル時間 | 2,973 ms | 
| コンパイル使用メモリ | 105,856 KB | 
| 実行使用メモリ | 23,424 KB | 
| 最終ジャッジ日時 | 2024-09-16 06:26:17 | 
| 合計ジャッジ時間 | 4,213 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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 ());
		}
	}
}
            
            
            
        
            
nanophoto12