結果

問題 No.2234 palindromer
ユーザー titia
提出日時 2023-03-03 22:03:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 296 bytes
コンパイル時間 735 ms
コンパイル使用メモリ 81,640 KB
実行使用メモリ 57,984 KB
最終ジャッジ日時 2024-09-17 23:00:53
合計ジャッジ時間 3,218 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def palidrome(S):
    for i in range(len(S)):
        if S[i]!=S[len(S)-1-i]:
            return False
    return True


S=input().strip()

for i in range(len(S)):
    T=S+S[:i][::-1]
    print(T)

    if palidrome(T)==True:
        print(T)
        break

0