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

問題 A - スワップ 回答 A, B = map(int, input().split()) tmp = A A = B B = tmp print(A, B) Python では、変数の入れ替えを一度に行うこともできます。 これは、Pyth...

記事を読む

[Python] pandasでUnicodeDecodeErrorが起きた時

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

記事を読む

[Python] ABC015 D DP 100点

問題 D – 高橋くんの苦悩 回答 動的計画法を使います。 Python では TLE ですが、PyPy では間に合いました。 W = int(input()) N, K = map(int, input().split()) AB =...

記事を読む

[Python] Pythonの練習問題サイト(英語)

時間がある時にやるための自分用のリスト。 下に行くほど難しい感じかと。 Codingbat projecteuler codeabbey Reddit の Daily Practice Problems 意味...

記事を読む

[Python] ヒープソート

Python でヒープソートを実装します。 ヒープソート ヒープソート(heap sort) とはリストの並べ替えを二分ヒープ木を用いて行うソートのアルゴリズムである(ヒープ領域とは無関係であることに注意する)。 出典: フリー百科事典『ウィキペディア(Wiki...

記事を読む


Public Domain YottaGin No Rights Reserved.