結果

問題 No.432 占い(Easy)
ユーザー tailstails
提出日時 2016-10-14 22:41:54
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 187 bytes
コンパイル時間 508 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,800 KB
最終ジャッジ日時 2024-05-01 23:34:34
合計ジャッジ時間 4,515 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
12,672 KB
testcase_01 AC 50 ms
12,672 KB
testcase_02 AC 51 ms
12,672 KB
testcase_03 AC 59 ms
12,672 KB
testcase_04 AC 58 ms
12,800 KB
testcase_05 AC 54 ms
12,800 KB
testcase_06 WA -
testcase_07 AC 54 ms
12,672 KB
testcase_08 AC 58 ms
12,672 KB
testcase_09 WA -
testcase_10 AC 146 ms
12,800 KB
testcase_11 AC 154 ms
12,800 KB
testcase_12 AC 165 ms
12,672 KB
testcase_13 AC 163 ms
12,800 KB
testcase_14 AC 150 ms
12,800 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 173 ms
12,800 KB
testcase_18 AC 154 ms
12,672 KB
testcase_19 AC 154 ms
12,800 KB
testcase_20 AC 133 ms
12,800 KB
testcase_21 AC 135 ms
12,672 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use bigint;
$n=<>;
for(1..$n){
	$_=<>;
	chomp;
	$l=length;
	$s=0;
	$i=1;
	$m=1;
	for(/./g){
		$t|=$_;
		$s=($s+$_*$m)%9;
		$m=$m*($l-$i)/$i;
		++$i;
	}
	$s=9 if $s==0&&$t;
	print$s,$/;
}
0