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

問題 A - クイズ 回答 条件分岐 Q = int(input()) if Q == 1: print('ABC') else: print('chokudai') 三項演算子 Q = int(input()) a...

記事を読む

[Python] 資本資産価格モデル CAPM

Python で資本資産価格モデルを実装します。 個別資産として バークシャーハサウェイ(BRK-A)、マーケット全体として S&P500 index ( ^GSPC )を使います。 無リスク資産の収益率は 2% で固定し簡略化します。 ...

記事を読む

[Python] multiprocessingを試す (4)

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

記事を読む

[Python] ABC010 B

問題 B - 花占い 回答 余りを利用する n = int(input()) a = list(map(int, input().split())) count = 0 for i in range(n): for j in range(a, ...

記事を読む

[Python] ABC010 C

問題 C - 浮気調査 ループの else 節 Python では、ループに else 節を設定することができ、「ループでbreakしなかったときにこの処理を行う」という処理を、フラグ変数を使わずに行えます。 4.4. break 文と continue...

記事を読む


Public Domain YottaGin No Rights Reserved.