結果

問題 No.3043 yukicoderへようこそ!
ユーザー fumiphysfumiphys
提出日時 2019-04-02 00:01:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 1,351 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 9,028 KB
最終ジャッジ日時 2023-08-18 03:44:02
合計ジャッジ時間 940 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,824 KB
testcase_01 AC 21 ms
9,028 KB
testcase_02 AC 19 ms
8,876 KB
testcase_03 WA -
testcase_04 AC 19 ms
9,016 KB
testcase_05 AC 19 ms
8,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import random
if __name__ == '__main__':
    line = input()
    b = 0
    if len(line.split(" ")) > 1:
        try:
            li = int(line[0])
            a, b = list(map(int, line.strip().split(" ")))
            res = a + b
            line = input()
            print("{} {}".format(res, line))
            b = 1
        except:
            pass
    if b == 1:
        sys.exit()
    try:
        line = int(line)
    except Exception as e:
        print("Hello World!")
        sys.exit()

    try:
        L = input()
    except Exception as e:
        if random.random() < 0.5:
            res = int(line * (line + 1) / 2)
            print(res)
        else:
            for i in range(1, line+1):
                res = ""
                if i % 3 == 0:
                    res += "Fizz"
                if i % 5 == 0:
                    res += "Buzz"
                if i % 3 != 0 and i % 5 != 0:
                    res = str(i)
                print(res)
        sys.exit()

    if len(L.split(" ")) > 1:
        val = list(map(int, L.strip().split(" ")))
        sum = 0
        for v in val:
            sum += v
        print(sum)
        sys.exit()
    else:
        sum = 0
        sum += int(L)
        for i in range(0, line - 1):
            a = int(input())
            sum += a
        print(sum)
        sys.exit()
0