結果
問題 |
No.599 回文かい
|
ユーザー |
![]() |
提出日時 | 2017-11-25 12:11:19 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 565 bytes |
コンパイル時間 | 2,410 ms |
コンパイル使用メモリ | 103,168 KB |
実行使用メモリ | 202,520 KB |
最終ジャッジ日時 | 2024-11-27 10:01:03 |
合計ジャッジ時間 | 57,374 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 10 OLE * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; class P { static void Main() { Console.WriteLine(kaibunkai(Console.ReadLine())); } static int kaibunkai(string s) { int res = 1; for (int i = 1; i < s.Length / 2; i++) { if (s.Substring(0, i) == s.Substring(s.Length - i, i)) { Console.WriteLine($"{s.Substring(0, i)},{s.Substring(i, s.Length - i * 2)},{s.Substring(s.Length - i, i)}"); res += kaibunkai(s.Substring(i + 1, s.Length - i * 2)); } } return res; } }