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 1 year has passed since last update.

B - Exponential AtCoder

Last updated at Posted at 2022-05-07

問題

回答

n = int(input())
ans = []

for i in range(1,1001):
    for j in range(2,101):
        if i ** j <= n:
            ans.append(i**j)
 
print(max(ans))

ポイント

冪乗の概念が理解できなかった。

1 →1の9乗
2 →2の4乗
3 →3の2乗
4 →2の2乗
5 →5の1乗 →冪乗数ではない
6 →6の1乗 →冪乗数ではない
7 →7の1乗 →冪乗数ではない
8 →2の3乗
9 →3の2乗
10 →10の1乗 →冪乗数ではない

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?