2014-01-08から1日間の記事一覧
問題文にかかれている通りに実装するだけ。 public class MiddleCode { public string encode(string s) { if (s.Length == 0) return ""; int removePosition; if (s.Length % 2 == 1) { removePosition = s.Length / 2; } else { if (s[s.Length / 2 - 1] …
問題文にかかれている通りに実装するだけ。 public class MiddleCode { public string encode(string s) { if (s.Length == 0) return ""; int removePosition; if (s.Length % 2 == 1) { removePosition = s.Length / 2; } else { if (s[s.Length / 2 - 1] …