結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー | むらため |
提出日時 | 2018-12-18 03:45:00 |
言語 | Nim (2.0.2) |
結果 |
AC
|
実行時間 | 62 ms / 2,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 2,013 ms |
コンパイル使用メモリ | 66,216 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-13 21:40:35 |
合計ジャッジ時間 | 4,499 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 2 ms
4,380 KB |
testcase_04 | AC | 2 ms
4,376 KB |
testcase_05 | AC | 8 ms
4,380 KB |
testcase_06 | AC | 31 ms
4,376 KB |
testcase_07 | AC | 62 ms
4,380 KB |
testcase_08 | AC | 34 ms
4,380 KB |
testcase_09 | AC | 24 ms
4,380 KB |
ソースコード
proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .} proc printf(formatstr: cstring){.header: "<stdio.h>", varargs.} var S : array[100002,char] var left: int32 = 0 var l : int32 = 0 while true: l += 1 let c = getchar_unlocked() S[l] = c if c == 'o' : left += 1 elif c != 'x': break left *= 100.int32 for i in 1.int32..<l.int32: let res :float32= left / (l-i) printf("%.5f\n",res) if S[i] == 'o' : left -= 100