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] BFSによるグラフの探索

無向グラフをBFSで探索するアルゴリズムを Python で記述します。 以下の続きです。 幅優先探索 幅優先探索(はばゆうせんたんさく、英: breadth first search)はグラフ理論(Graph theory)において木構造(...

記事を読む

[Python] ABC006 A

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

記事を読む

[Python] コマンドプロンプトでtermcolorが文字化けする時

windows10のコマンドプロンプトでpythonのtermcolorで出力に色をつけようとすると、色ではなく文字化けが発生します。 termcolor は unix で使われる ANSIエスケープシーケンスというものを使うためで、これが windows のコマンドプ...

記事を読む

[Python] ABC002 D by python

D - 派閥 from itertools import combinations n, m = map(int, input().split()) matrix_relations = * n for _ in range(n)] # matrixに関係を格納する。...

記事を読む

[Python] pandasでUnicodeDecodeErrorが起きた時

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

記事を読む


Public Domain YottaGin No Rights Reserved.