結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー |
![]() |
提出日時 | 2020-12-22 19:46:16 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,173 bytes |
コンパイル時間 | 870 ms |
コンパイル使用メモリ | 103,680 KB |
実行使用メモリ | 22,784 KB |
最終ジャッジ日時 | 2024-09-21 14:17:26 |
合計ジャッジ時間 | 4,118 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 4 RE * 5 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp131 { class Program { static void Main(string[] args) { string n = Console.ReadLine(); char[] h = new char[n.Length]; int o = 0; int x = 0; double a = 0; for(int i = 0; i < n.Length; i++) { //h[i] = n[i]; if (n[i] == 'o') { o += 1; } else { x += 1; } } // int[] m = new int[n.Length]; for (int i = 0; i < n.Length; i++) { a = (o / o + x)*100; Console.WriteLine(a); if (n[i] == 'o') { o -= 1; // n[i] = '-'; } else if (n[i] == 'x') { x -= 1; //n[i] = '-'; } } Console.ReadLine(); } } }