結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
|
提出日時 | 2019-09-23 02:33:18 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 103 ms / 2,000 ms |
コード長 | 314 bytes |
コンパイル時間 | 2,847 ms |
コンパイル使用メモリ | 64,672 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 04:10:34 |
合計ジャッジ時間 | 4,301 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import strutils proc printf(str: cstring) {.header: "<stdio.h>", importc: "printf", varargs.} let s: string = stdin.readline n: int = s.len var a: int = s.count('o') b: int = n - a ans: float for i in 0..<n: ans = a / (a + b) * 100 printf("%.13f\n", ans) if s[i] == 'o': a.dec else: b.dec