結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2016-08-24 22:24:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 511 bytes |
コンパイル時間 | 486 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-15 01:06:08 |
合計ジャッジ時間 | 2,280 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 RE * 5 |
ソースコード
N = int(input()) d_total = 0 f_total = 0 for i in range(N): s = input().strip().split(".") d = int(s[0]) if len(s) == 2: f = int(s[1])*(10**(10-len(s[1]))) else: f = 0 if "-" in s[0]: f *= -1 d_total += d f_total += f total = str(d_total * 10**10 + f_total) d = total[:len(total)-10] key = 0 for i in d[::-1]: if i != "0": break key -= 1 d_total = int(d[:len(d)-key]) f_total = int(total[len(total)-10:]) print("%d.%010d"%(d_total, f_total))