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

Last updated at Posted at 2025-09-04

ABC407-A

問題の内容

四捨五入

言語

Rust

解法

四捨五入をする…

課題

四捨五入のアルゴリズム

学んだこと

x/yの四捨五入のアルゴリズムは
(x2+y)/(y2)

提出内容

use proconio::input;

fn main() {
  input!{
    a: i64,
    b: i64,
  }
  let answer = (a * 2 + b) / (b * 2);
  println!("{}", answer);
}

成績

  • 146Byte
  • AC
  • 1ms
  • 2084KiB
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?