Submission #19558075


Source Code Expand

Copy
var w = Console.ReadLine().Split(' ');
int n = int.Parse(w[0]);
int x = int.Parse(w[1]);
string s = Console.ReadLine();
for (int i=0; i<n; i++)
{
  if (s[i] == 'o')
    x++;
  else if (x>0)
    x--;
}
Console.WriteLine(x);

Submission Info

Submission Time
Task B - Quizzes
User wads
Language C# (.NET Core 3.1.201)
Score 0
Code Size 235 Byte
Status CE

Compile Error

Program.cs(5,1): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(5,11): error CS8124: Tuple must contain at least two elements. [/imojudge/csharp/csharp.csproj]
Program.cs(5,11): error CS1026: ) expected [/imojudge/csharp/csharp.csproj]
Program.cs(5,11): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(5,18): error CS1003: Syntax error, '>' expected [/imojudge/csharp/csharp.csproj]
Program.cs(5,18): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(5,20): error CS0116: A namespace cannot directly contain members such as fields or methods [/imojudge/csharp/csharp.csproj]
Program.cs(5,21): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(7,12): error CS8124: Tuple must contain at least two elements. [/imojudge/csharp/csharp.csproj]
Program.cs(7,12): error CS1026: ) expected [/imojudge/csharp/csharp.csproj]
Program.cs(7,12): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(8,5): error CS0116: A namespace cannot directly contain members such as fields or methods [/imojudge/csharp/csharp.csproj]
Program.cs(8,6): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(9,13): error CS8124: Tuple must contain at least two elements. [/imojudge/csharp/csharp.csproj]
Program.cs(9,13): error CS1026: ) expected [/imojudge/csharp/csharp.csproj]
Program.cs(9,13): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(10,5): error CS0116: A namespace cannot directly contain members such as fields or methods [/imojudge/csharp/csharp.csproj]
Program.cs(10,6): error CS1022: Type or namespace definition, or end-of-file expected [/imojudge/csharp/csharp.csproj]
Program.cs(11,1): error CS1022: Type or namespace def...