YottaGin

Freedom is a responsible choice.

[Python] ABC005 A

2019/4/16 プログラミング

問題

A – おいしいたこ焼きの作り方

回答

割り算するだけ。

import sys
# input処理を高速化する
input = sys.stdin.readline

def main():
    X, Y = list(map(int, input().split()))
    ans = Y // X
    print(ans)
    
main()

Atcoder, Python GinO

関連記事

[Python] ABC020 A

問題 A - クイズ 回答 条件分岐 Q = int(input()) if Q == 1: print('ABC') else: print('chokudai') 三項演算子 Q = int(input()) a...

記事を読む

[Python] Kadane’s algorithm

最大部分配列問題 数値で構成された配列内の部分配列の中で、総和が最大となるものを求めます。 Incomputer science, themaximum sum subarray problemis the task of finding a contig...

記事を読む

[Python] ABC006 A

問題 A - 世界のFizzBuzz 回答 import sys # input処理を高速化する input = sys.stdin.readline def main(): N = int(input()) if N % 3 == 0: ...

記事を読む

[Python] クラスメソッドと静的メソッド

今まで、Python でのクラスメソッド、静的メソッドを意識したことがなかったので、備忘録です。 Difference between staticmethod and classmethod 静的メソッドはクラスの外に定義されている関数と同じ。確たる理由がなければ...

記事を読む

[Python] ABC014 A

問題 A - けんしょう先生のお菓子配り 回答 a = int(input()) b = int(input()) remainder = a % b shortage = 0 if remainder > 0: shortage = b - ...

記事を読む


Public Domain YottaGin No Rights Reserved.