結果
問題 | No.546 オンリー・ワン |
ユーザー |
![]() |
提出日時 | 2017-07-14 23:08:47 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 354 ms / 2,000 ms |
コード長 | 220 bytes |
コンパイル時間 | 504 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 12,800 KB |
最終ジャッジ日時 | 2024-10-07 23:30:37 |
合計ジャッジ時間 | 2,903 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 7 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
($n,$l,$h)=glob<>;@c=glob<>;for$k(1..2**$n-1){{use bigint;$a=1;}$c=0;for$i(0..$n-1){if($k&1<<$i){$a=$a->blcm($c[$i]);++$c;}}$r+=(int($h/$a)-int(($l-1)/$a))*$c*(-1)**($c-1);}print $r;