YottaGin

Freedom is a responsible choice.

[Python] ABC014 A

2019/12/6 2019/12/6 プログラミング

問題

A – けんしょう先生のお菓子配り

回答

a = int(input())
b = int(input())

remainder = a % b

shortage = 0
if remainder > 0:
    shortage = b - remainder

print(shortage)

Atcoder, Python GinO

関連記事

[Python] ABC004

B - 回転 table = [] while True: try: table.append(list(input().split())) except: break table = table #print(table) table_180...

記事を読む

[Python] ABC018 A

問題 A - 豆まき 回答 A = int(input()) B = int(input()) C = int(input()) l = l_sorted = sorted(l) for num in l: print(l_sorted.in...

記事を読む

[Python] tweepyを使ってみる (1)

Twitter APIs Twitter APIを通してTwitterを利用することができます。 APIを利用するためには、まず、以下で開発者として登録を行います。 その後、"create an app"を行い、以下の4つのキーを取得します。 A...

記事を読む

[Python] ABC019 C

問題 C - 高橋くんと魔法の箱 回答 スライドに従い、50点回答を求めます。 AtCoder Beginner Contest 019 解説 from AtCoder Inc. N = int(input()) a = list(...

記事を読む

[Python] ハノイの塔

ハノイの塔 ハノイの塔(ハノイのとう、Tower of Hanoi)はパズルの一種。バラモンの塔またはルーカスタワー(Lucas' Tower)とも呼ばれる。 ハノイの塔出典: フリー百科事典『ウィキペディア(Wikipedia)』 再帰で良く出てくるア...

記事を読む


Public Domain YottaGin No Rights Reserved.