プログラミングのお題スレ Part22 (863レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

15
(2): デフォルトの名無しさん [sage] 2023/08/08(火)19:36 ID:ODiXw46s(1)
>>3
Rust

use std::collections::HashSet;
use std::io::{self, BufRead, BufReader};

fn main() {
 match BufReader::new(io::stdin())
  .lines()
  .map(Result::unwrap)
  .filter(|line| {
   line.bytes()
    .filter(|b| matches!(b, b'A'..=b'Z'| b'a'..=b'z'))
    .collect::<HashSet<_>>()
    .len()
    .eq(&26)
  })
  .min_by_key(String::len)
 {
  Some(shortest) => println!("{shortest}"),
  None => eprintln!("ERROR: no matched lines"),
 }
}
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.023s