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] 壁伸ばし法による迷路生成

迷路生成のアルゴリズム 迷路生成のアルゴリズムは数多くあります。 Maze Classification -Maze Creation Algorithms 迷路生成の各種アルゴリズムのC++実装 (Win/Mac両対応) 棒倒し法、穴掘り法と迷路作成の...

記事を読む

[Python] Punctuationの一括削除

punctuationとは、記号文字列のことです。 str.translate() を使う方法と、正規表現を使う方法で行ってみます。 str.translate() を使うPunctuationの削除 str.translate()を使い、Punctuat...

記事を読む

[Python] ABC012 B

問題 B - 入浴時間 回答 N = int(input()) seconds = N % 60 minutes = (N // 60) % 60 hours = N // (60 ** 2) % 60 s_seconds = '{:02d}'.forma...

記事を読む

[Python] Educational DP Contest K – Stones

問題 K - Stones 参考 AtCoderDPまとめコンテスト K問題 「Stones」 例題 2. EDPC K 問題 - Stones 〜 石取りゲームの一般化 〜 回答 import sys # input処理を高速化する inp...

記事を読む

[Python] N桁のビット列を全て求める

問題 N桁のビット列を全て求めなさい。 回答 その1 def apped_zero_one_front(x, L): return def bit_strings(n): if n == 0: return [] ...

記事を読む


Public Domain YottaGin No Rights Reserved.