Submission #3477525
Source Code Expand
using System; using System.Linq;//リストの使用 using System.Collections.Generic; class Program { static void Main() { string s = Console.ReadLine(); bool answer = true; long countMemo = 0; for(long i = 1; i < s.Length; i++) { if(s[i] == '{') countMemo++; if(s[i] == '}') countMemo--; if(s[i] == ',' && countMemo == 0) answer = false; } Console.WriteLine((answer) ? "dict" : "set"); } }
Submission Info
Submission Time | |
---|---|
Task | B - 天下一リテラル |
User | suikameron |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 464 Byte |
Status | CE |
Compile Error
./Main.cs(14,11): error CS1502: The best overloaded method match for `string.this[int]' has some invalid arguments /usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error) ./Main.cs(14,12): error CS1503: Argument `#1' cannot convert `long' expression to type `int' ./Main.cs(15,11): error CS1502: The best overloaded method match for `string.this[int]' has some invalid arguments /usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error) ./Main.cs(15,12): error CS1503: Argument `#1' cannot convert `long' expression to type `int' ./Main.cs(16,11): error CS1502: The best overloaded method match for `string.this[int]' has some invalid arguments /usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error) ./Main.cs(16,12): error CS1503: Argument `#1' cannot convert `long' expression to type `int'