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?

More than 3 years have passed since last update.

ABC205 C - POW を解いた

Posted at

abc205_1.png
abc205_2.png

A,B はマイナスだったり、プラスだったりする。
C が偶数なら 2 乗、奇数なら 3 乗で大小比較すれば十分だと思った。

abc205c.py
A,B,C = map(int,input().split())

if C%2 == 0:
    ans1 = A**2
    ans2 = B**2
else:
    ans1 = A**3
    ans2 = B**3

if ans1 == ans2:
    print("=")
elif ans1 < ans2:
    print("<")
else:
    print(">")
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?