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] 幅優先探索で迷路を解く

幅優先探索 幅優先探索(Breadth First Search)とは、グラフを始点から近い順に1つずつ調べていく探索法です。キューを使うことにより、FIFOで全てを探索するというイメージで理解しています。 wikipedia 幅優先探索 迷路の幅優先探索、ま...

記事を読む

[Python] pandasでUnicodeDecodeErrorが起きた時

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

記事を読む

[Python] ABC015 D メモ化再帰 100点

問題 D – 高橋くんの苦悩 回答 defaultdict defaultdict を使ってみましたが、残念ながらTLEでした。 import collections W = int(input()) N, K = map(int, ...

記事を読む

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

Selenium Seleniumは、webアプリケーションのテストのためのフレームワークですが、スクレイピングでも良く使われます。Seleniumを使うことで、webブラウザを操作することができます。 公式サイト 今回はPythonでSeleniumを使うこ...

記事を読む

[Python] multiprocessingを試す (1)

multiprocessing multiprocessing とは、プロセスベースで並列処理を行う python の bulid-in モジュールです。 処理を並列に行えるので、処理が速くなります。 multiprocessing--- プロセスベースの並列...

記事を読む


Public Domain YottaGin No Rights Reserved.