結果
| 問題 | No.3035 文字列のみの反転 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-14 09:57:42 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 2,000 ms |
| コード長 | 579 bytes |
| 記録 | |
| コンパイル時間 | 676 ms |
| コンパイル使用メモリ | 183,848 KB |
| 実行使用メモリ | 9,204 KB |
| 最終ジャッジ日時 | 2026-07-07 02:35:57 |
| 合計ジャッジ時間 | 2,284 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#![allow(dead_code, unused_imports, unused_macros, non_snake_case)]
use proconio::{
input,
marker::{Bytes, Chars, Usize1},
};
fn main() {
input! {
s: Chars,
}
let alphabets = s
.iter()
.filter(|&c| c.is_alphabetic())
.copied()
.collect::<Vec<_>>();
let numbers = s
.iter()
.filter(|&c| c.is_numeric())
.copied()
.collect::<Vec<_>>();
let text = alphabets
.iter()
.rev()
.chain(numbers.iter())
.collect::<String>();
println!("{}", text);
}