結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー hiro1729
提出日時 2023-08-27 08:25:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 400 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-26 21:49:47
合計ジャッジ時間 2,194 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = 0
for _ in range(n):
	a = input()
	s = 1
	p = 0
	if a[0] == '-':
		s = -1
		a = a[1:]
	if '.' in a:
		d = a.index('.')
		a1 = int(a[:d])
		a2 = a[d + 1:]
		a2 = int(a2) * 10 ** (10 - len(a2))
		p = a1 * 10 ** 10 + a2
	else:
		p = int(a) * 10 ** 10
	ans += s * p
s = str(ans)
if s[0] == '-':
	s = '-' + s[1:].zfill(11)
if s[0] == '.':
	s = '0' + s
print(s[:-10] + '.' + s[-10:])
0