結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2023-02-28 08:56:30 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 82,688 KB |
実行使用メモリ | 52,864 KB |
最終ジャッジ日時 | 2024-09-15 11:58:48 |
合計ジャッジ時間 | 2,828 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 15 |
ソースコード
N = int(input()) ans = 0 for i in range(N): n = input() pm = 1 if n[0] == "-": n = n[1:] pm = -1 if "." in n: X, Y = n.split(".") ans += int(X) * 10 ** 10 * pm ans += int(Y + "0" * (10 - len(Y))) * pm else: ans += int(n) * 10 ** 10 * pm X = ans // (10 ** 10) Y = str(ans % (10 ** 10)) Y += "0" * (10 - len(Y)) print(str(X) + "." + str(Y))