結果

問題 No.2234 palindromer
ユーザー qibqib
提出日時 2023-05-12 21:26:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 360 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 71,608 KB
最終ジャッジ日時 2023-08-19 03:50:24
合計ジャッジ時間 3,363 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,368 KB
testcase_01 AC 81 ms
71,276 KB
testcase_02 AC 75 ms
71,312 KB
testcase_03 AC 76 ms
71,292 KB
testcase_04 AC 74 ms
71,388 KB
testcase_05 AC 75 ms
71,216 KB
testcase_06 AC 73 ms
71,292 KB
testcase_07 AC 74 ms
71,584 KB
testcase_08 AC 77 ms
71,148 KB
testcase_09 AC 77 ms
71,460 KB
testcase_10 AC 73 ms
71,352 KB
testcase_11 AC 76 ms
71,608 KB
testcase_12 AC 74 ms
71,420 KB
testcase_13 AC 74 ms
71,336 KB
testcase_14 AC 75 ms
71,388 KB
testcase_15 AC 74 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a = list(input())

n = len(a)
for i in range(n):
  flg = True
  for j in range((n - i) // 2):
    if a[i + j] != a[n - 1 - j]:
      flg = False
      break

  if flg:
    print(''.join(a + list(reversed(a[0:i]))))
    exit()
0