結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
12,672 KB
testcase_01 AC 47 ms
12,544 KB
testcase_02 AC 48 ms
12,672 KB
testcase_03 AC 58 ms
12,672 KB
testcase_04 AC 58 ms
12,672 KB
testcase_05 AC 55 ms
12,800 KB
testcase_06 WA -
testcase_07 AC 57 ms
12,800 KB
testcase_08 AC 54 ms
12,672 KB
testcase_09 WA -
testcase_10 AC 146 ms
12,800 KB
testcase_11 AC 147 ms
12,672 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 170 ms
12,672 KB
testcase_18 AC 157 ms
12,672 KB
testcase_19 AC 152 ms
12,800 KB
testcase_20 AC 131 ms
12,672 KB
testcase_21 AC 138 ms
12,800 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

use bigint;
<>;
for(<>){
    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