結果
| 問題 |
No.667 Mice's Luck(ネズミ達の運)
|
| コンテスト | |
| ユーザー |
nobigomu
|
| 提出日時 | 2018-04-27 18:03:09 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 261 bytes |
| コンパイル時間 | 83 ms |
| コンパイル使用メモリ | 6,944 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 21:44:00 |
| 合計ジャッジ時間 | 1,140 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
(function (f, s)
local n,d,t = f(s,"o"),#s,"%.13f\n"
for i=1,#s do io.write(t:format(n/d*100)) if s:sub(i,i)=="o" then n=n-1 end d=d-1 end
end)(function (s, c)
local r = 0
for i=1,#s do if s:sub(i,i)==c then r=r+1 end end
return r
end, io.stdin:read("*l"))
nobigomu