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] ABC018 D 100点

問題 D – バレンタインデー 回答 女子の組み合わせ、男子の組み合わせを全て列挙すると\( {}_{18} C _9 \times {}_{18} C _9 \)、女子の組み合わせだけを列挙しその組み合わせに対してチョコをもらう...

記事を読む

[Python] クラスカル法

クラスカル法を用いて、重み付き無向グラフの最小全域木を求めます。 以下の記事の続きです。 プリム法は、ある頂点を選び、その頂点と繋がる辺の中で最小のものを選ぶことで、結果的に最小全域木を得ることができるアルゴリズムです。 クラスカル法は、閉路を作...

記事を読む

[Python] ABC019 C

問題 C - 高橋くんと魔法の箱 回答 スライドに従い、50点回答を求めます。 AtCoder Beginner Contest 019 解説 from AtCoder Inc. N = int(input()) a = list(...

記事を読む

[Python] ABC002 C

C - 直訴 xa, ya, xb, yb, xc, yc = map(int, input().split()) #(xa, ya)が原点になるように三角形を平行移動する。 a = xb - xa b = yb - ya c = xc - xa d = yc - y...

記事を読む

[Python] multiprocessingを試す (4)

前回からの続きです。 pool python で mulitprocessing を行う方法として、process 以外に pool があります。 プロセスプール process と pool の違い Python Multiproce...

記事を読む


Public Domain YottaGin No Rights Reserved.