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 30点

問題 D - バレンタインデー 回答 AtCoder Beginner Contest 018 解説 from AtCoder Inc. itertools.combinations を使い、全ての組み合わせを列挙します。 imp...

記事を読む

[Python] コマンドプロンプトでtermcolorが文字化けする時

windows10のコマンドプロンプトでpythonのtermcolorで出力に色をつけようとすると、色ではなく文字化けが発生します。 termcolor は unix で使われる ANSIエスケープシーケンスというものを使うためで、これが windows のコマンドプ...

記事を読む

[Python] Educational DP Contest K – Stones

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

記事を読む

[Python] 2分探索 リストの中でindexと数値が等しいもの

2分探索 2分探索の練習をします。 重複のないリストの中で、indexの値と数値が等しいものを探します。 例えば、というリストであれば3、というリストであれば0、というリストであればNoneが答えになります。 def find_value_e...

記事を読む

[Python] NLTKを使ってみる (5) Sentiment Analysis 感情分析

以下の続きです。 以下参考にしています。 Python NLTK: Twitter Sentiment Analysis Sentiment Analysis 感情分析 Sentiment analysis(also known as...

記事を読む


Public Domain YottaGin No Rights Reserved.