0
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に挑んだ軌跡-ABC397-A-

Posted at

ABC397-A

問題の内容

体温が平熱か高熱かの判定

言語

Rust

解法

シンプルif分岐

課題

整数と自然数は型が違うからf64かi64かで変わる。

学んだこと

分岐が多くなるならmatchで書いた方が見やすい

書くのにかかった秒数

2分/目標40秒

提出内容

use proconio::input;
fn main() {
  input! {
    x: f64,
  }
  if x >= 38.0 {
    println!("1");
  } else if x < 37.5 {
    println!("3");
  } else {
    println!("2");
  }
}

成績

  • 185Byte
  • AC
  • 1ms
  • 2012KiB
0
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
0
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?