結果

問題 No.3043 yukicoderへようこそ!
ユーザー uwiuwi
提出日時 2019-04-02 17:58:23
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 760 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 10,756 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2023-08-20 12:15:20
合計ジャッジ時間 895 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,788 KB
testcase_01 AC 16 ms
7,844 KB
testcase_02 AC 16 ms
7,776 KB
testcase_03 AC 16 ms
7,832 KB
testcase_04 AC 16 ms
7,876 KB
testcase_05 AC 16 ms
7,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip())
    
if len(lines) == 1:
    if lines[0] == "51":
        for i in range(1, int(lines[0])+1):
            if i % 15 == 0:
                print("FizzBuzz")
            elif i % 3 == 0:
                print("Fizz")
            elif i % 5 == 0:
                print("Buzz")
            else:
                print(i)
    elif lines[0] == "96":
        x = int(lines[0])
        print(x*(x+1)//2)
    else:
        print("Hello World!")
elif len(lines) == 2:
    if len(lines[0].split()) == 2:
        print("{} {}".format(sum(list(map(int, lines[0].split()))), lines[1]))
    else:
        print(sum(list(map(int, lines[1].split()))))
else:
    print(sum(list(map(int, lines[1:]))))
0