結果
| 問題 | 
                            No.306 さいたま2008
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-12-25 22:29:34 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 37 ms / 2,000 ms | 
| コード長 | 385 bytes | 
| コンパイル時間 | 256 ms | 
| コンパイル使用メモリ | 82,692 KB | 
| 実行使用メモリ | 53,600 KB | 
| 最終ジャッジ日時 | 2025-02-14 12:18:33 | 
| 合計ジャッジ時間 | 2,174 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 26 | 
ソースコード
import sys
if sys.platform =='ios':
	import clipboard
	a=clipboard.get()
	a = a.split('\n')
	text = '\n'.join(a)
	with open('input_file.txt','w') as f:
		f.write(text)
	sys.stdin = open('input_file.txt')
	
x1,y1 = map(int,input().split())
x2,y2 = map(int,input().split())
a = abs(y2-y1)/(x2+x1)
if y2 == y1:
	print(y1)
	exit()
if y1 < y2:
	y = a*(-x2)+y2
else:
	y = a*(-x1)+y1
print(y)