Qiita Teams that are logged in
You are not logged in to any team

Community
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@taxfree_python

# PythonでABC156のA,Bを解く

More than 1 year has passed since last update.

### はじめに

こんばんは、tax_freeです。前回からレートが15下りました。今回はAとBしか解けませんでした。悔しい

### A問題

``````n, r = map(int,input().split())
if n < 10:
print(r+(100*(10-n)))
else:
print(r)
``````

### B問題

10進法からn進法に変換して、lenで長さを調べている。

``````n, k = map(int,input().split())
def Base_10_to_n(X, n):
if (int(X/n)):
return Base_10_to_n(int(X/n), n)+str(X%n)
return str(X%n)
print(len(Base_10_to_n(n,k)))
``````

### D問題

\$2^n\$の計算を高速化する方法を知らなかったので解けず。

### まとめ

0
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
1. We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
2. you can read useful information later efficiently
By "stocking" the articles you like, you can search right away