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

関連記事

[データ構造] TRIE木

TRIE木 トライ木(英:trie)やプレフィックス木(英:prefix tree)とは、順序付き木の一種。あるノードの配下の全ノードは、自身に対応する文字列に共通するプレフィックス(接頭部)があり、ルート(根)には空の文字列が対応している。値は一般に...

記事を読む

[Python] ABC018 A

問題 A - 豆まき 回答 A = int(input()) B = int(input()) C = int(input()) l = l_sorted = sorted(l) for num in l: print(l_sorted.in...

記事を読む

[Python] Kadane’s algorithm

最大部分配列問題 数値で構成された配列内の部分配列の中で、総和が最大となるものを求めます。 Incomputer science, themaximum sum subarray problemis the task of finding a contig...

記事を読む

[Python] ABC015 D DP 100点

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

記事を読む

[Python] ABC014 A

問題 A - けんしょう先生のお菓子配り 回答 a = int(input()) b = int(input()) remainder = a % b shortage = 0 if remainder > 0: shortage = b - ...

記事を読む


Public Domain YottaGin No Rights Reserved.