結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2025-04-10 13:45:03 |
言語 | C# (.NET 8.0.404) |
結果 |
AC
|
実行時間 | 429 ms / 2,000 ms |
コード長 | 717 bytes |
コンパイル時間 | 9,391 ms |
コンパイル使用メモリ | 173,460 KB |
実行使用メモリ | 190,920 KB |
最終ジャッジ日時 | 2025-04-10 13:45:18 |
合計ジャッジ時間 | 12,288 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (125 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
class Program { static void Main(string[] args) { string s = Console.ReadLine(); double safeCount = SafeCount(s); for (int i = 0; i < s.Length; i++) { double parsent = (safeCount / (s.Length - i )) *100; Console.WriteLine(parsent); if (s[i] == 'o') { safeCount--; } } } private static double SafeCount(string s) { double count = 0; foreach (char c in s) { if (c == 'o') { count++; } } return count; } }