結果
問題 | No.146 試験監督(1) |
ユーザー | nak2yoshi |
提出日時 | 2016-02-22 01:03:43 |
言語 | D (dmd 2.106.1) |
結果 |
AC
|
実行時間 | 124 ms / 1,000 ms |
コード長 | 415 bytes |
コンパイル時間 | 836 ms |
コンパイル使用メモリ | 93,708 KB |
実行使用メモリ | 7,188 KB |
最終ジャッジ日時 | 2023-09-02 20:38:10 |
合計ジャッジ時間 | 1,822 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 122 ms
5,864 KB |
testcase_01 | AC | 123 ms
7,188 KB |
testcase_02 | AC | 124 ms
6,968 KB |
ソースコード
import std.stdio, std.conv, std.string, std.range, std.math, std.algorithm; enum Mod = 1000000007; void main() { auto N = readln.strip.to!int; long[] C, D; foreach (_; 0 .. N) { auto input = readln.split.to!(long[]); C ~= input[0]; D ~= input[1]; } 0UL.reduce!((a,b) => (a+((C[b]+1)/2%Mod)*(D[b]%Mod))%Mod)(0.iota(N)).writeln; }