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?

paiza.ioでruby その5

Posted at

概要

paiza.ioでrubyやってみた。
atcoder、見つけたのでやってみた。

参考にしたページ

練習問題

ABC 086 A - Product
2つの整数値を受け取り、その積が2の倍数かを判定する問題です。

投入するソース

1 21

期待値

Odd

サンプルコード

a, b = gets.strip.split.map(&:to_i)
puts (a * b).odd? ? 'Odd' : 'Even'

実行結果

Odd

成果物

以上。

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?