結果
問題 | No.238 Mr. K's Another Gift |
ユーザー |
|
提出日時 | 2019-11-23 11:02:48 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 247 bytes |
コンパイル時間 | 325 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 8,448 KB |
最終ジャッジ日時 | 2024-10-11 06:49:22 |
合計ジャッジ時間 | 2,972 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 40 |
ソースコード
#yuki238 s=raw_input() n=len(s) for i in range(n/2): if s[i]!=s[n-i-1]: t=s[:n-i]+s[i]+s[n-i:] u=s[:i]+s[n-i-1]+s[i:] if t==t[::-1]: print t elif u==u[::-1]: print u else: print'NA' break else: print s[:n/2]+s[n/2]+s[n/2:]