結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー NoNo
提出日時 2018-03-23 23:09:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 735 ms / 2,000 ms
コード長 577 bytes
コンパイル時間 4,085 ms
コンパイル使用メモリ 103,672 KB
実行使用メモリ 27,296 KB
最終ジャッジ日時 2023-09-07 04:11:04
合計ジャッジ時間 8,459 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
23,212 KB
testcase_01 AC 56 ms
21,420 KB
testcase_02 AC 59 ms
23,200 KB
testcase_03 AC 59 ms
23,264 KB
testcase_04 AC 66 ms
23,200 KB
testcase_05 AC 127 ms
23,296 KB
testcase_06 AC 396 ms
25,268 KB
testcase_07 AC 735 ms
27,296 KB
testcase_08 AC 564 ms
25,240 KB
testcase_09 AC 470 ms
23,328 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.Linq;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            double a = s.Length;
            double sc = s.Count(x => x == 'o');
            double oc = s.Count(x => x == 'x');


            foreach (var item in s)
            {
                var ans = sc / a * 100;
                Console.WriteLine(ans);

                a--;
                if (item == 'o')
                {
                    sc -= 1;
                }
            }
        }
    }
}
0