結果

問題 No.3072 Sum of sqrt(x)
ユーザー KayShirasawaKayShirasawa
提出日時 2020-11-23 01:42:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 212 bytes
コンパイル時間 503 ms
コンパイル使用メモリ 10,528 KB
実行使用メモリ 118,808 KB
最終ジャッジ日時 2023-09-30 23:12:52
合計ジャッジ時間 29,780 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,776 KB
testcase_01 AC 17 ms
7,788 KB
testcase_02 AC 15 ms
7,884 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 15 ms
7,728 KB
testcase_05 AC 15 ms
7,756 KB
testcase_06 AC 15 ms
7,812 KB
testcase_07 TLE -
testcase_08 AC 1,215 ms
8,320 KB
testcase_09 AC 1,323 ms
8,216 KB
testcase_10 AC 1,534 ms
7,808 KB
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 TLE -
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
ans = 0
d = {}
for _ in range(N):
    x = int(input())
    if x in d:
        ans += d[x]
    else:
        d[x] = x**0.5
        ans += d[x]
    print(ans)
0