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] ABC019 A

問題 A - 高橋くんと年齢 回答 abc = list(map(int, input().split())) print(sorted(abc))

記事を読む

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

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

記事を読む

[Python] ABC020 B

問題 B - 足し算 回答 A, B = input().split() AB = A + B ans = 2 * int(AB) print(ans)

記事を読む

[Python] デコレーターについて

Python のデコレーターについて理解するための個人的なまとめです。 デコレーター 8.6. 関数定義 @f1(arg) @f2 def func(): pass は大体次と等価です。 def func(): pass func = f1(arg...

記事を読む

[Python] ABC015 B

問題 B - 高橋くんの集計 回答 切り上げ math.ceil(x) import math N = int(input()) A = list(map(int, input().split())) cnt_bugs = 0 cnt_...

記事を読む


Public Domain YottaGin No Rights Reserved.