結果

問題 No.238 Mr. K's Another Gift
コンテスト
ユーザー convexineq
提出日時 2020-12-19 12:16:32
言語 PyPy3
(7.3.23)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 61 ms / 2,000 ms
+ 353µs
コード長 208 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 228 ms
コンパイル使用メモリ 96,208 KB
実行使用メモリ 82,884 KB
最終ジャッジ日時 2026-09-01 14:09:20
合計ジャッジ時間 5,956 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

s = input()
t = s[::-1]
n = len(s)//2
i = 0
while i < n and s[i]==t[i]: i += 1
ss = s[:i] + t[i] + s[i:]
tt = t[:i] + s[i] + t[i:]
if ss == ss[::-1]: print(ss)
elif tt == tt[::-1]: print(tt)
else: print("NA")
0