結果

問題 No.2034 Anti Lexicography
コンテスト
ユーザー ixTL255
提出日時 2023-02-12 13:43:56
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 2,000 ms
+ 856µs
コード長 390 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 17,742 ms
コンパイル使用メモリ 178,232 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-13 15:34:50
合計ジャッジ時間 10,069 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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>>();
   |

ソースコード

diff #
raw source code

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);
}
0