結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー RikiyaFujiiRikiyaFujii
提出日時 2018-04-30 21:13:22
言語 Go
(1.22.1)
結果
TLE  
実行時間 -
コード長 395 bytes
コンパイル時間 11,685 ms
コンパイル使用メモリ 203,884 KB
実行使用メモリ 7,800 KB
最終ジャッジ日時 2023-09-10 08:31:39
合計ジャッジ時間 15,911 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

func main() {
	input := bufio.NewScanner(os.Stdin)
	if input.Scan() {
		list := strings.Split(input.Text(), "")
		for e, _ := range list {
			var count float64
			for i := e; i < len(list); i++ {
				if list[i] == "o" {
					count++
				}
			}
			oneProb := 100.0 / float64(len(list)-e)
			fmt.Printf("%.13f\n", oneProb*count)
		}
	}
}
0