結果

問題 No.1336 Union on Blackboard
ユーザー さかぽんさかぽん
提出日時 2021-02-19 17:44:43
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 468 bytes
コンパイル時間 3,575 ms
コンパイル使用メモリ 105,636 KB
実行使用メモリ 23,752 KB
最終ジャッジ日時 2023-10-14 12:26:54
合計ジャッジ時間 8,031 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
21,612 KB
testcase_01 AC 65 ms
23,616 KB
testcase_02 AC 65 ms
21,572 KB
testcase_03 AC 65 ms
21,588 KB
testcase_04 AC 68 ms
21,608 KB
testcase_05 AC 65 ms
21,536 KB
testcase_06 AC 64 ms
21,664 KB
testcase_07 AC 65 ms
21,656 KB
testcase_08 AC 64 ms
21,524 KB
testcase_09 AC 65 ms
21,672 KB
testcase_10 AC 66 ms
23,576 KB
testcase_11 AC 71 ms
21,464 KB
testcase_12 AC 66 ms
21,664 KB
testcase_13 AC 67 ms
23,616 KB
testcase_14 AC 66 ms
21,600 KB
testcase_15 AC 67 ms
23,596 KB
testcase_16 AC 66 ms
23,608 KB
testcase_17 AC 66 ms
23,644 KB
testcase_18 AC 66 ms
21,604 KB
testcase_19 AC 68 ms
21,572 KB
testcase_20 AC 67 ms
23,752 KB
testcase_21 AC 65 ms
19,468 KB
testcase_22 AC 66 ms
21,484 KB
testcase_23 AC 65 ms
21,696 KB
testcase_24 AC 66 ms
21,536 KB
testcase_25 AC 65 ms
23,652 KB
testcase_26 AC 65 ms
21,504 KB
testcase_27 AC 65 ms
21,652 KB
testcase_28 AC 65 ms
21,572 KB
testcase_29 AC 65 ms
21,504 KB
testcase_30 AC 63 ms
23,512 KB
testcase_31 AC 64 ms
21,756 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.Linq;

class B
{
	const long M = 1000000007;
	static int[] Read() => Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
	static void Main() => Console.WriteLine(string.Join("\n", new int[int.Parse(Console.ReadLine())].Select(_ => Solve())));
	static object Solve()
	{
		var n = int.Parse(Console.ReadLine());
		var a = Read();

		long r = a[0];
		for (int i = 1; i < n; i++)
		{
			r += (1 + r) * a[i];
			r %= M;
		}
		return r;
	}
}
0