結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2021-02-07 01:02:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 5,000 ms |
コード長 | 538 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-22 16:55:54 |
合計ジャッジ時間 | 2,033 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
N=int(input()) S=0 for i in range(N): A=input() if "." in A: x=A.index(".") A+="0"*(11-len(A)+x) #print(x,len(A)-x,A) B="" for a in A: if a!=".": B+=a #print(B) S+=int(B) else: S+=int(A)*10**10 #print(S) if S>=0: S=str(S) while len(S)<11: S="0"+S S=S[:-10]+"."+S[-10:] print(S) else: S=-S S=str(S) while len(S)<11: S="0"+S #print(S) S=S[:-10]+"."+S[-10:] print("-"+S)