結果
問題 |
No.81 すべて足すだけの簡単なお仕事です。
|
ユーザー |
👑 |
提出日時 | 2022-07-04 14:08:39 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 5,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 330 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,736 KB |
最終ジャッジ日時 | 2024-07-22 16:59:40 |
合計ジャッジ時間 | 2,421 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
n = int(input()) tot = 0 for _ in range(n): S = input() try: ind = S.index(".") except: ind = len(S) S = S[:ind] + S[ind+1:].ljust(10, "0") tot += int(S) tot = str(tot) minus = False if tot[0] == "-": minus = True tot = tot[1:] tot = tot.zfill(11) if minus: tot = "-" + tot print(f"{tot[:-10]}.{tot[-10:]}")