1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

初心者プログラマーAtCoderに挑んだ軌跡-ABC402-A-

Posted at

ABC4-A

問題の内容

文字列から大文字の抽出

言語

Rust

解法

最近はまりのイテレータでやっていこうと思う。.collectで何とかなると思います。

課題

404をやってみてほしい。
きっとRustが好きになります。

学んだこと

404はぜひともやってみてほしい。
""と''の違いはとても大事なので404でfindしてみてほしい…

提出内容

use proconio::input;

fn main() {
  input! {
    s: String,
  }
  let result: String = s
    .chars()
    .filter(|c| ('A'..='Z').contains(c))
    .collect();
  println!("{}", result);
}

成績

  • 197Byte
  • AC
  • 1ms
  • 2084KiB
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?