Help us understand the problem. What is going on with this article?

プログラミングで数学と英語を学ぶ(その1)

問題

https://projecteuler.net/problem=1

使用する英単語

https://progeigo.org/learning/essential-words-600-plus/
のAから始まる単語

プログラム

#!/usr/bin/python3
# -*- coding: utf-8 -*-

# author : my page
# account : my page
# my favorite audio : anime song

import sys

# 割り算を許可した数字
allow_numer_list = [3,5]

if len(sys.argv) != 2 :
    # このアプリケーションの使用を受け入れるには、引数を1つ入力してください。
    print('To accept the usage of this application, input one argumet.')
    sys.exit(1)

try :
    # 適用する数字
    apply_number = int(sys.argv[1])

except :
    # この引数は利用可能な属性ではない
    print('This argument is not available attribute.')
    sys.exit(1)

# 入手する数字
access_number = 0
# 配列
array = range(1, apply_number)
for num in array :
    # 代替の数字?
    for alternative_num in allow_numer_list :
        # 回避しないアルゴリズム?
        # not avoid algorithm
        if num % alternative_num == 0:
            access_number += num
            break

print(access_number)

実行結果

# python3 test.py 1000
233168

結論

もっと英語勉強します。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした