結果
問題 | No.2234 palindromer |
ユーザー | Navier_Boltzmann |
提出日時 | 2023-03-03 21:22:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 51 ms / 2,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 82,560 KB |
実行使用メモリ | 61,056 KB |
最終ジャッジ日時 | 2024-09-17 22:14:38 |
合計ジャッジ時間 | 1,814 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
from collections import * from itertools import * from functools import * import sys,math input = sys.stdin.readline A = list(input())[:-1] N = len(A) for i in range(N): tmp = A[:] Y = A[:i] Y.reverse() tmp = tmp + Y n = len(tmp) if all(tmp[i]==tmp[-1-i] for i in range(n)): print(''.join(tmp)) exit()