結果

問題 No.146 試験監督(1)
ユーザー togaerrortogaerror
提出日時 2015-03-15 16:45:47
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 284 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 5,340 KB
実行使用メモリ 5,112 KB
最終ジャッジ日時 2023-09-11 08:21:55
合計ジャッジ時間 1,251 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

#!/usr/bin/perl

use strict;
use warnings;

my $n = <>;
my $total = 0;

for(my $i = 0; $i < $n; $i++) {
	my ($c, $d) = split / /, <>;
	my $num = int((($c +1) / 2)) * $d;
	$num %= (10**9 + 7);
	$total += $num;
	$total %= (10**9 + 7);
}

$total %= (10**9 + 7);
print "$total\n";

exit;
0