結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー |
![]() |
提出日時 | 2018-09-07 18:08:19 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 659 ms / 2,000 ms |
コード長 | 461 bytes |
コンパイル時間 | 1,524 ms |
コンパイル使用メモリ | 103,808 KB |
実行使用メモリ | 23,552 KB |
最終ジャッジ日時 | 2024-11-28 03:36:49 |
合計ジャッジ時間 | 5,344 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;public class Hello{public static void Main(){var s = Console.ReadLine().Trim();var sL = s.Length;var ok = sL - s.Replace("o", "").Length;var ng = sL - ok;for (int i = 0; i < sL; i++){Console.WriteLine(getA(ok, ng));if (s[i] == 'o') ok--;else ng--;}}public static double getA(int a, int b) => (double)a / (a + b) * 100.0;}