結果

問題 No.3043 yukicoderへようこそ!
ユーザー fumiphysfumiphys
提出日時 2019-04-01 23:55:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 741 bytes
コンパイル時間 126 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-05 10:02:47
合計ジャッジ時間 729 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 25 ms
10,624 KB
testcase_03 AC 26 ms
10,624 KB
testcase_04 AC 26 ms
10,624 KB
testcase_05 AC 27 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

try:
    L = input()
except Exception as e:
    res = int(line * (line + 1) / 2)
    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