LoginSignup
0
0

More than 3 years have passed since last update.

C#でAtCoder Beginners Selection(ABC086A - Product)

Last updated at Posted at 2021-01-19

準備

C#でAtCoderデビューのための準備
のあとで AtCoder Beginners Selection をやってみました。

問題文

ABC086A - Product
https://atcoder.jp/contests/abs/tasks/abc086_a

提出結果

using System;
class Program
{
    static void Main(string[] args)
    {
        string[] input = Console.ReadLine().Split(' ');
        int a = int.Parse(input[0]);
        int b = int.Parse(input[1]);
        int amari = (a * b) % 2;
        if (amari == 0) Console.WriteLine("Even");
        if (amari == 1) Console.WriteLine("Odd");
    }
}

テスト実行

image.png
image.png

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