結果

問題 No.1237 EXP Multiple!
ユーザー tailstails
提出日時 2020-09-25 21:35:06
言語 Perl
(5.38.2)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 196 bytes
コンパイル時間 928 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 45,104 KB
最終ジャッジ日時 2023-09-10 17:22:18
合計ジャッジ時間 8,656 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
5,152 KB
testcase_01 AC 367 ms
31,032 KB
testcase_02 AC 509 ms
40,540 KB
testcase_03 AC 538 ms
41,436 KB
testcase_04 AC 318 ms
42,000 KB
testcase_05 AC 293 ms
40,172 KB
testcase_06 AC 297 ms
40,248 KB
testcase_07 AC 301 ms
40,260 KB
testcase_08 AC 334 ms
45,060 KB
testcase_09 AC 294 ms
40,188 KB
testcase_10 AC 300 ms
40,304 KB
testcase_11 AC 298 ms
40,244 KB
testcase_12 AC 340 ms
44,248 KB
testcase_13 AC 338 ms
44,916 KB
testcase_14 AC 344 ms
45,072 KB
testcase_15 AC 343 ms
44,992 KB
testcase_16 AC 338 ms
44,920 KB
testcase_17 AC 336 ms
45,104 KB
testcase_18 AC 341 ms
45,036 KB
testcase_19 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$p=1;
<>;
for(glob<>){
	if($_==0){
		print -1;
		exit;
	}
	if($_>3){
		print 1000000007;
		exit;
	}
	$p*=(0,1,4,729)[$_];
	if($p>1000000007){
		print 1000000007;
		exit;
	}
}
print 1000000007%$p;
0