結果
| 問題 | No.2034 Anti Lexicography |
| コンテスト | |
| ユーザー |
ixTL255
|
| 提出日時 | 2023-02-12 13:43:56 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 390 bytes |
| 記録 | |
| コンパイル時間 | 5,900 ms |
| コンパイル使用メモリ | 187,748 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-30 19:26:53 |
| 合計ジャッジ時間 | 2,472 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
コンパイルメッセージ
warning: unnecessary parentheses around closure body --> src/main.rs:11:33 | 11 | let ans = s.chars().map(|x| ((219 - x as u8) as char)).collect::<Vec<char>>(); | ^ ^ | = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default help: remove these parentheses | 11 - let ans = s.chars().map(|x| ((219 - x as u8) as char)).collect::<Vec<char>>(); 11 + let ans = s.chars().map(|x| (219 - x as u8) as char ).collect::<Vec<char>>(); |
ソースコード
use std::io;
fn main() {
let mut n = String::new();
io::stdin().read_line(&mut n).ok();
let _n: usize = n.trim().parse().unwrap();
let mut s = String::new();
io::stdin().read_line(&mut s).ok();
let s = s.trim();
let ans = s.chars().map(|x| ((219 - x as u8) as char)).collect::<Vec<char>>();
let ans: String = ans.iter().collect();
println!("{}", ans);
}
ixTL255