結果
| 問題 |
No.528 10^9と10^9+7と回文
|
| ユーザー |
tails
|
| 提出日時 | 2017-06-10 00:33:49 |
| 言語 | Perl (5.40.0) |
| 結果 |
AC
|
| 実行時間 | 175 ms / 1,000 ms |
| コード長 | 181 bytes |
| コンパイル時間 | 207 ms |
| コンパイル使用メモリ | 6,812 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-23 18:31:03 |
| 合計ジャッジ時間 | 2,726 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 28 |
コンパイルメッセージ
Possible precedence problem on bitwise | operator at Main.pl line 5. Main.pl syntax OK
ソースコード
$_=<>;$l=y///c;
for$m(1e9,1e9+7){
$f=$r=0;
for$i(0..$l/2-1){
$r=($r.0+n($i)+($i>0|$l&1)*9)%$m;
$f=n($i)<=>n($l-$i-2)||$f;
}
print+($r-($f>0))%$m,$/;
}
sub n{substr$_,"@_",1}
tails