diff --git a/csharp/Feb22/Feb22.sln b/csharp/Feb22/Feb22.sln index 2aded55..5b977df 100644 --- a/csharp/Feb22/Feb22.sln +++ b/csharp/Feb22/Feb22.sln @@ -4,6 +4,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cn-0221", "cn-0221\cn-0221. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "int-0221", "int-0221\int-0221.csproj", "{9CCC88EF-7FA3-4406-B41B-EAC86AEF8760}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "int-0222", "int-0222\int-0222.csproj", "{70C4BB01-2740-48F5-911A-FEB254C1AAD5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -18,5 +20,9 @@ Global {9CCC88EF-7FA3-4406-B41B-EAC86AEF8760}.Debug|Any CPU.Build.0 = Debug|Any CPU {9CCC88EF-7FA3-4406-B41B-EAC86AEF8760}.Release|Any CPU.ActiveCfg = Release|Any CPU {9CCC88EF-7FA3-4406-B41B-EAC86AEF8760}.Release|Any CPU.Build.0 = Release|Any CPU + {70C4BB01-2740-48F5-911A-FEB254C1AAD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70C4BB01-2740-48F5-911A-FEB254C1AAD5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70C4BB01-2740-48F5-911A-FEB254C1AAD5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70C4BB01-2740-48F5-911A-FEB254C1AAD5}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/csharp/Feb22/int-0222/Program.cs b/csharp/Feb22/int-0222/Program.cs new file mode 100644 index 0000000..02f73e5 --- /dev/null +++ b/csharp/Feb22/int-0222/Program.cs @@ -0,0 +1,17 @@ +namespace int_0222; + +public class Solution { + public int TitleToNumber(string columnTitle) { + int ret = 0; + foreach (char c in columnTitle) + ret = (26 * ret) - 'A' + c + 1; + return ret; + } +} + +public class Runner { + public static void Main() { + var s = new Solution(); + Console.WriteLine(s.TitleToNumber("ZY")); + } +} \ No newline at end of file diff --git a/csharp/Feb22/int-0222/int-0222.csproj b/csharp/Feb22/int-0222/int-0222.csproj new file mode 100644 index 0000000..bb3d932 --- /dev/null +++ b/csharp/Feb22/int-0222/int-0222.csproj @@ -0,0 +1,11 @@ + + + + Exe + net6.0 + int_0222 + enable + enable + + +