結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー iwkjoseciwkjosec
提出日時 2018-03-23 22:30:41
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 724 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 4,955 ms
コンパイル使用メモリ 105,220 KB
実行使用メモリ 27,440 KB
最終ジャッジ日時 2023-09-07 03:06:23
合計ジャッジ時間 6,957 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
23,148 KB
testcase_01 AC 57 ms
23,360 KB
testcase_02 AC 58 ms
25,220 KB
testcase_03 AC 60 ms
23,388 KB
testcase_04 AC 65 ms
23,252 KB
testcase_05 AC 124 ms
25,296 KB
testcase_06 AC 391 ms
27,236 KB
testcase_07 AC 724 ms
27,440 KB
testcase_08 AC 571 ms
25,376 KB
testcase_09 AC 459 ms
23,280 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;

class Program
{
    static void Main()
    {
        var S = ReadLine();
        var o = 0;
        var O = S.Count(x => x == 'o');
        for (int i = 0; i < S.Length; i++)
        {
            WriteLine((double)(O-o)/(S.Length-i)*100);
            if (S[i] == 'o')o++;
        }
    }
}
0