結果

問題 No.8043 yukicoderへようこそ!
ユーザー fumiphysfumiphys
提出日時 2019-04-01 23:42:24
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 510 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-27 05:09:59
合計ジャッジ時間 961 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3 WA * 2 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
line = input()
line = line.strip().split(" ")
if len(line) > 1:
    res = int(line[0]) + int(line[1])
    line = input()
    print("{} {}".format(res, line.strip()))
    sys.exit()
else:
    line = line[0]
try:
    n = int(line)
except Exception as e:
    print("Hello World!")
    sys.exit()
sum = 0
cnt = 0
try:
    while True:
        s = int(input())
        sum += s
        cnt += 1
except Exception as e:
    if cnt == 0:
        print(int(n * (n + 1) / 2))
    else:
        print(int(sum))
0