Submission #19555416
Source Code Expand
import math x1,y1,x2,y2=map(int,input().split()) root2=1.4141356 #中央の点を求める aDash=x2-x1 bDash=y2-y1 #print('aDash,bDash = {},{}'.format(aDash,bDash)) chuoux=(aDash-bDash)/2 chuouy=(aDash+bDash)/2 #print("chuoux,chuouy={},{}".format(chuoux,chuouy)) chuoux+=x1 chuouy+=y1 #print("chuoux,chuouy={},{}".format(chuoux,chuouy)) #x2を中央揃えする x2 -= chuoux y2 -= chuouy #90度回転 x3= -y2 y3 = x2 #90度回転 x4= -y3 y4 = x3 x2+=chuoux x3+=chuoux x4+=chuoux y2+=chuouy y3+=chuouy y4+=chuouy x3,x4,y3,y4 = [int(i) for i in [x3,x4,y3,y4]] print(x3,y3,x4,y4) #math.round
Submission Info
Submission Time | |
---|---|
Task | B - Ruined Square |
User | mossycat |
Language | Python (3.8.2) |
Score | 200 |
Code Size | 642 Byte |
Status | AC |
Exec Time | 29 ms |
Memory | 9140 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt, s3.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, s1.txt, s2.txt, s3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 25 ms | 8896 KB |
02.txt | AC | 25 ms | 9096 KB |
03.txt | AC | 24 ms | 8892 KB |
04.txt | AC | 23 ms | 9032 KB |
05.txt | AC | 20 ms | 9140 KB |
06.txt | AC | 18 ms | 9096 KB |
07.txt | AC | 19 ms | 9100 KB |
08.txt | AC | 22 ms | 9136 KB |
s1.txt | AC | 20 ms | 8860 KB |
s2.txt | AC | 29 ms | 8892 KB |
s3.txt | AC | 19 ms | 9080 KB |