結果

問題 No.2234 palindromer
ユーザー titiatitia
提出日時 2023-03-03 22:36:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 81,600 KB
実行使用メモリ 59,296 KB
最終ジャッジ日時 2023-10-18 02:44:31
合計ジャッジ時間 1,843 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,360 KB
testcase_01 AC 38 ms
53,360 KB
testcase_02 AC 38 ms
53,360 KB
testcase_03 AC 38 ms
53,360 KB
testcase_04 AC 38 ms
53,360 KB
testcase_05 AC 38 ms
53,360 KB
testcase_06 AC 39 ms
53,360 KB
testcase_07 AC 41 ms
53,360 KB
testcase_08 AC 39 ms
53,360 KB
testcase_09 AC 39 ms
53,360 KB
testcase_10 AC 39 ms
53,360 KB
testcase_11 AC 42 ms
59,296 KB
testcase_12 AC 38 ms
53,360 KB
testcase_13 AC 38 ms
53,360 KB
testcase_14 AC 38 ms
53,360 KB
testcase_15 AC 38 ms
53,360 KB
権限があれば一括ダウンロードができます

ソースコード

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]

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