結果
問題 |
No.238 Mr. K's Another Gift
|
ユーザー |
|
提出日時 | 2015-07-05 23:01:43 |
言語 | Python2 (2.7.18) |
結果 |
RE
|
実行時間 | - |
コード長 | 341 bytes |
コンパイル時間 | 65 ms |
コンパイル使用メモリ | 6,944 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-07 23:42:37 |
合計ジャッジ時間 | 8,541 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | AC * 1 RE * 39 |
ソースコード
s = raw_input() m = len(s) / 2 for i in xrange(m): 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[:m] + s[m] + s[m:]