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

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

記事を読む

[Python] ABC003 D

D - AtCoder社の冬 import math # 順列 def P(n, r): return math.factorial(n)//math.factorial(n-r) # 組み合わせ def C(n, r): return P(n, r)/...

記事を読む

[Python] k近傍法 (1)

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

記事を読む

[Python] ABC008 A

問題 A - アルバム 回答 S, T = map(int, input().split()) nums_pics = T - S + 1 print(nums_pics)

記事を読む

GridSearchCV で LGBM の Categorical Feature を使う際のエラー

sklearn の GridSearchCV を LightGBM で使おうとした時、 GridSearch へ Categorical Feature を渡そうとすると “categorical_feature keyword has been found in params...

記事を読む


Public Domain YottaGin No Rights Reserved.