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

Posted at

ABC400-A

問題の内容

400を割り切れる数を与えられているか

言語

Rust

解法

返り値を400/aで設定し、返せるかどうかを%で判別した

課題

タイポ1回

学んだこと

書くのにかかった秒数

2分41秒+ペナ5分/目標40秒

提出内容

use proconio::input;
fn main() {
  input! {
    a: i32,
  }
  let mut answer;
  answer = 400 / a;
  if 400 % a == 0 {
    println!("{}",answer);
  } else {
    println!("-1");
  }
}

成績

  • 193Byte
  • AC
  • 1ms
  • 2056KiB
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?