提出 #76601055


ソースコード 拡げる

import sys
def debug(*args):
    print(*args, file=sys.stderr)

import math

N = int(input())
x0, y0 = map(int, input().split())
xn, yn = map(int, input().split())
xc = (x0 + xn) / 2
yc = (y0 + yn) / 2
theta = math.pi * 2 / N

# debug(xc, yc, theta)
# debug(math.cos(theta), math.sin(theta))

x1 = (x0 - xc) * math.cos(theta) - (y0 - yc) * math.sin(theta) + xc
y1 = (x0 - xc) * math.sin(theta) + (y0 - yc) * math.cos(theta) + yc

print(x1, y1)

提出情報

提出日時
問題 D - Opposite
ユーザ satomshr
言語 Python (PyPy 3.11-v7.3.20)
得点 400
コード長 464 Byte
結果 AC
実行時間 50 ms
メモリ 80124 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 400 / 400
結果
AC × 2
AC × 18
セット名 テストケース
Sample sample_01.txt, sample_02.txt
All handmade_00.txt, handmade_01.txt, handmade_02.txt, handmade_03.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, sample_01.txt, sample_02.txt
ケース名 結果 実行時間 メモリ
handmade_00.txt AC 50 ms 80124 KiB
handmade_01.txt AC 50 ms 79984 KiB
handmade_02.txt AC 50 ms 80048 KiB
handmade_03.txt AC 50 ms 80124 KiB
random_00.txt AC 50 ms 80104 KiB
random_01.txt AC 50 ms 79932 KiB
random_02.txt AC 50 ms 79808 KiB
random_03.txt AC 50 ms 79808 KiB
random_04.txt AC 49 ms 79828 KiB
random_05.txt AC 49 ms 79928 KiB
random_06.txt AC 50 ms 79984 KiB
random_07.txt AC 50 ms 79904 KiB
random_08.txt AC 49 ms 79932 KiB
random_09.txt AC 49 ms 79848 KiB
random_10.txt AC 49 ms 79760 KiB
random_11.txt AC 50 ms 79836 KiB
sample_01.txt AC 49 ms 79956 KiB
sample_02.txt AC 50 ms 79984 KiB