結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー むらためむらため
提出日時 2018-12-18 03:32:33
言語 Nim
(2.0.2)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 2,209 ms
コンパイル使用メモリ 66,268 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-13 21:40:39
合計ジャッジ時間 3,554 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,380 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 33 ms
4,380 KB
testcase_09 AC 23 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

proc scanf(formatstr: cstring){.header: "<stdio.h>", varargs.}
proc printf(formatstr: cstring){.header: "<stdio.h>", varargs.}
var S : array[100002,char]
scanf("%s\n",addr S)
var left = 0
var l = 0
while S[l] != '\0':
  if S[l] == 'o' : left += 1
  l += 1
for i in 0..<l:
  let res = 100 * left / (l-i)
  printf("%.4f\n",res)
  if S[i] == 'o' : left -= 1
0