結果
| 問題 |
No.238 Mr. K's Another Gift
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2020-12-19 12:16:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 2,000 ms |
| コード長 | 208 bytes |
| コンパイル時間 | 265 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 60,928 KB |
| 最終ジャッジ日時 | 2024-09-21 10:11:35 |
| 合計ジャッジ時間 | 4,444 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 40 |
ソースコード
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")
convexineq