結果
| 問題 |
No.3035 文字列のみの反転
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-01 23:11:04 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 374 bytes |
| コンパイル時間 | 15,705 ms |
| コンパイル使用メモリ | 398,856 KB |
| 実行使用メモリ | 8,232 KB |
| 最終ジャッジ日時 | 2025-03-01 23:11:21 |
| 合計ジャッジ時間 | 12,759 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
use proconio::{input, marker::Chars};
fn main() {
input! {
s: Chars,
}
let a = s.iter().filter(|&c| c.is_alphabetic()).collect::<Vec<_>>();
let b = s.iter().filter(|&c| c.is_numeric()).collect::<Vec<_>>();
for i in (0..a.len()).rev() {
print!("{}", a[i])
}
for i in 0..b.len() {
print!("{}", b[i])
}
println!()
}