結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2018-04-12 14:35:59 |
言語 | Perl (5.40.0) |
結果 |
AC
|
実行時間 | 184 ms / 2,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 332 ms |
コンパイル使用メモリ | 7,068 KB |
実行使用メモリ | 14,720 KB |
最終ジャッジ日時 | 2024-06-26 21:24:27 |
合計ジャッジ時間 | 1,523 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
Main.pl syntax OK
ソースコード
use strict; use warnings; my $str = <>; chomp $str; my %p = (m => length($str)+1, c => scalar(() = $str =~ m/o/g)); for my $i(split '', $str){ print sprintf("%.13f", $p{c}/--$p{m} * 100)."\n"; if($i eq 'o' and $p{c}){ $p{c}--; } }