結果
問題 | No.238 Mr. K's Another Gift |
ユーザー | りあん |
提出日時 | 2015-07-05 23:07:32 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 2,869 bytes |
コンパイル時間 | 3,884 ms |
コンパイル使用メモリ | 106,012 KB |
実行使用メモリ | 26,756 KB |
最終ジャッジ日時 | 2023-09-22 07:11:08 |
合計ジャッジ時間 | 14,055 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 69 ms
22,512 KB |
testcase_05 | AC | 70 ms
22,600 KB |
testcase_06 | TLE | - |
testcase_07 | AC | 297 ms
22,928 KB |
testcase_08 | AC | 306 ms
20,988 KB |
testcase_09 | AC | 1,798 ms
20,688 KB |
testcase_10 | AC | 48 ms
20,384 KB |
testcase_11 | AC | 49 ms
22,552 KB |
testcase_12 | AC | 49 ms
18,344 KB |
testcase_13 | AC | 50 ms
22,500 KB |
testcase_14 | AC | 1,152 ms
22,512 KB |
testcase_15 | TLE | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Numerics; namespace Solver { class Program { const int M = 1000000007; static void Main() { var sw = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; var sc = new Scan(); var s = sc.Str; int n = s.Length; char[] c = new char[n - 1]; for (int i = 0; i < n - 1; i++) c[i] = s[i + 1]; if (kaibun(c)) { sw.WriteLine(s + s[0].ToString()); sw.Flush(); return; } for (int i = 0; i < n - 1; i++) { c[i] = s[i]; if (kaibun(c)) { sw.WriteLine(s.Insert(n - i - 1, s[i + 1].ToString())); sw.Flush(); return; } } sw.WriteLine("NA"); sw.Flush(); } static bool kaibun(char[] c) { for (int i = 0; i <= c.Length / 2; i++) { if (c[i] != c[c.Length - i - 1]) return false; } return true; } } class Scan { public int Int { get { return int.Parse(Console.ReadLine().Trim()); } } public long Long { get { return long.Parse(Console.ReadLine().Trim()); } } public string Str { get { return Console.ReadLine().Trim(); } } public int[] IntArr { get { return Console.ReadLine().Trim().Split().Select(int.Parse).ToArray(); } } public long[] LongArr { get { return Console.ReadLine().Trim().Split().Select(long.Parse).ToArray(); } } public double[] DoubleArr { get { return Console.ReadLine().Split().Select(double.Parse).ToArray(); } } public string[] StrArr { get { return Console.ReadLine().Trim().Split(); } } public List<int> IntList { get { return Console.ReadLine().Trim().Split().Select(int.Parse).ToList(); } } public List<long> LongList { get { return Console.ReadLine().Trim().Split().Select(long.Parse).ToList(); } } public void Multi(out int a, out int b) { var arr = IntArr; a = arr[0]; b = arr[1]; } public void Multi(out int a, out int b, out int c) { var arr = IntArr; a = arr[0]; b = arr[1]; c = arr[2]; } public void Multi(out int a, out string b) { var arr = StrArr; a = int.Parse(arr[0]); b = arr[1]; } public void Multi(out int a, out char b) { var arr = StrArr; a = int.Parse(arr[0]); b = arr[1][0]; } public void Multi(out long a, out long b) { var arr = LongArr; a = arr[0]; b = arr[1]; } public void Multi(out string a, out string b) { var arr = StrArr; a = arr[0]; b = arr[1]; } } }