YottaGin

Freedom is a responsible choice.

[Python] ABC006 A

2019/4/17 プログラミング

問題

A – 世界のFizzBuzz

回答

import sys
# input処理を高速化する
input = sys.stdin.readline

def main():
    N = int(input())
    if N % 3 == 0:
        print('YES')
    else:
        print('NO')
    
main()

Atcoder, Python GinO

関連記事

[Python] k近傍法 (1)

scikit-learn という有名なモジュールを用いて、有名なあやめの分類問題を、k近傍法で解いてみます。 IPython で行います。 k近傍法 k近傍法(ケイきんぼうほう、英:k-nearest neighbor algorithm,k-NN)は、特徴空...

記事を読む

[Python] ABC015 D 全探索 0点

問題 D - 高橋くんの苦悩 回答 TLE で 0点ですが、まずは再帰的に行う全探索を考えます。 p32 です。 W = int(input()) N, K = map(int, input().split()) AB = de...

記事を読む

[Python] ABC017 C 101点 いもす法

問題 C – ハイスコア 回答 スライドに従っていもす法を使います。 AtCoder Beginner Contest 017 解説 from AtCoder Inc. N, M = map(int, input().spl...

記事を読む

[Python] ABC016 D

問題 D - 一刀両断 回答 以下が大変参考になりました。 直線と線分 import numpy as np Ax, Ay, Bx, By = map(int, input().split()) N = int(input()) posit...

記事を読む

[Python] ABC003 B

B - AtCoderトランプ s = input() t = input() commercial_at = flag = True for i in range(len(s)): if s == t: continue elif ...

記事を読む


Public Domain YottaGin No Rights Reserved.