結果

問題 No.8072 Sum of sqrt(x)
ユーザー Mao-beta
提出日時 2024-08-22 12:22:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,582 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 716 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 160,564 KB
最終ジャッジ日時 2024-08-22 12:25:08
合計ジャッジ時間 148,432 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

import os
import math

def main():
    dat = os.read(0, 20000010).decode().split('\n')
    ans = 0
    for x in dat[1:-1]:
        x = int(x)
        ans += int(math.sqrt(x) * 10**22)
        d = str(ans // 10**22)
        s = str(ans)[:len(d)] + "." + str(ans)[len(d):]
        print(s[:19])


if __name__ == "__main__":
    main()
0