結果
| 問題 | No.2234 palindromer |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-01 01:41:21 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 2,000 ms |
| + 783µs | |
| コード長 | 443 bytes |
| 記録 | |
| コンパイル時間 | 2,307 ms |
| コンパイル使用メモリ | 186,692 KB |
| 実行使用メモリ | 9,836 KB |
| 最終ジャッジ日時 | 2026-09-26 18:59:03 |
| 合計ジャッジ時間 | 4,414 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
use std::io::{self, BufRead};
fn main() {
let stdin = io::stdin();
let mut line = String::new();
stdin.lock().read_line(&mut line).unwrap();
let a = line.trim();
let n = a.len();
for i in 0..=n {
let b = &a[..i];
let x = format!("{}{}", a, b.chars().rev().collect::<String>());
if x == x.chars().rev().collect::<String>() {
println!("{}", x);
return;
}
}
}