結果

問題 No.3062 A + B
ユーザー 👑 p-adicp-adic
提出日時 2023-09-17 15:15:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 652 ms
コンパイル使用メモリ 10,816 KB
実行使用メモリ 7,928 KB
最終ジャッジ日時 2023-09-17 15:15:19
合計ジャッジ時間 951 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 16 ms
7,808 KB
testcase_04 AC 17 ms
7,872 KB
testcase_05 WA -
testcase_06 AC 16 ms
7,908 KB
testcase_07 WA -
testcase_08 AC 16 ms
7,756 KB
testcase_09 AC 15 ms
7,828 KB
testcase_10 AC 16 ms
7,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

R=range
N=input().split()
A=[]
for n in N:
	s=0
	L=len(n)
	for i in R(L):
		if n[i]=='.':
			s,n=L-i-1,n[:i]+n[i+1:]
			break
	A+=[int(n),s]
N=str(A[0]*10**A[3]+A[2]*10**A[1])
s=len(N)-A[1]-A[3]
if s<=0:N,s="0"*(1-s)+N,1
N=N[:s]+"."+N[s:]
for i in R(len(N)-1,s-1,-1):
	if N[i]!='0':
		if N[i]<'0':N=N[:s]
		else:N=N[:i+1]
		break
print(N)
0