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

問題 A - 引越し作業 切り上げ処理 math.ceil(x) 商と余りを一度に取得 divmod(a, b) 回答 N = int(input()) nums_thereback = N // 2 + N % 2 print...

記事を読む

[Python] ABC006 A

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

記事を読む

[Python] ABC016 C

問題 C - 友達の友達 回答 友達の友達を数える 集合を使い、友達の友達を探索して数えます。 import collections N, M = map(int, input().split()) adjacent_dict = col...

記事を読む

[Python] ABC015 A

問題 A - 高橋くんの研修 回答 A = input() B = input() if len(A) > len (B): print(A) else: print(B)

記事を読む

[Python] pandasでUnicodeDecodeErrorが起きた時

Windowsで作成したcsvファイルをpandasで開こうとすると、良くUnicodeDecodeErrorが出ていらいらさせられます。 read_csvでencoding='cp932'つけることで今までは解決していたのですが、なぜか今回はうまくいきません。 ...

記事を読む


Public Domain YottaGin No Rights Reserved.