結果

問題 No.189 SUPER HAPPY DAY
ユーザー tailstails
提出日時 2015-04-22 00:52:22
言語 Perl
(5.38.2)
結果
WA  
実行時間 -
コード長 474 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 11,324 KB
最終ジャッジ日時 2023-09-18 07:01:07
合計ジャッジ時間 19,750 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 679 ms
10,948 KB
testcase_01 AC 679 ms
10,948 KB
testcase_02 AC 686 ms
11,176 KB
testcase_03 AC 681 ms
10,968 KB
testcase_04 AC 685 ms
10,956 KB
testcase_05 AC 679 ms
10,884 KB
testcase_06 AC 688 ms
11,028 KB
testcase_07 AC 681 ms
10,884 KB
testcase_08 AC 680 ms
10,928 KB
testcase_09 AC 683 ms
10,940 KB
testcase_10 AC 681 ms
10,984 KB
testcase_11 AC 684 ms
10,988 KB
testcase_12 AC 680 ms
11,168 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.pl syntax OK

ソースコード

diff #

$mod=1000000009;

@0=(1);
for$n(1..199){
    for$i(0..$n*9){
	for$d(0..9){
	    ($$n[$i+$d]+=${$n-1}[$i])%=$mod;
	}
    }
}

<>=~$";$M=$`+1;$D=$'+1;

$o=0;
$_=$M;
while($_){
  s/.//;
  $l=length;
  for$i(0..@$l){
    for$d(0..$&-1){
      $M[$o+$i+$d]+=$$l[$i];
    }
  }
  $o+=$&;
}

$o=0;
$_=$D;
while($_){
  s/.//;
  $l=length;
  for$i(0..@$l){
    for$d(0..$&-1){
      $D[$o+$i+$d]+=$$l[$i];
    }
  }
  $o+=$&;
}

for(1..1999){
  ($r+=$D[$_]*$M[$_])%=$mod;
}
print$r;
0