Skip to content

Instantly share code, notes, and snippets.

View AspirantDrago's full-sized avatar
🏠
Working from home

Александр Николаевич Иванов AspirantDrago

🏠
Working from home
View GitHub Profile
import math
RADIUS = 100
def polygon(n):
result = []
for i in range(n):
angle = 2 * math.pi * i / n
x = math.cos(angle) * RADIUS
import math
RADIUS = 100
TOL = 1
def polygon(n):
result = []
for i in range(n):
angle = 2 * math.pi * i / n
import math
RADIUS = 100
TOL = 0.1
def polygon(n):
result = []
for i in range(n):
angle = 2 * math.pi * i / n
import math
RADIUS = 100
def polygon(n):
result = []
for i in range(n):
angle = 2 * math.pi * i / n
x = math.cos(angle) * RADIUS
for _ in range(int(input())):
n = int(input())
print(0, 0, n, flush=True)
while True:
x, y, r = map(int, input().split())
if (x, y, r) == (0, 0, 0):
break
print(-x, -y, r, flush=True)
data = {
5: [(0, 0), (1, 0), (1, 1), (0, 2), (-1, 2), (-2, -2), (0, -3), (1, -3), (3, -2),
(4, 0), (4, 1), (3, 3), (2, 4), (0, 5)],
10: [(0, 0), (1, 0), (1, 1), (0, 2), (-1, 2), (-2, -2), (0, -3), (1, -3), (3, -2),
(4, 0), (4, 1), (3, 3), (2, 4), (0, 5), (-1, 5), (-5, 2), (-4, -4), (-3, -5),
(0, -6), (1, -6), (6, -2), (5, 4), (3, 6), (0, 7), (-1, 7), (-4, 6), (-7, 2),
(-7, -3), (-6, -5), (0, -8), (1, -8), (8, -2), (6, 6), (3, 8), (-5, 7),
(-8, 4), (-9, 0), (-9, -1), (-7, -6), (-5, -8), (-3, -9), (4, -9), (7, -7),
(8, -6)],
20: [(0, 0), (1, 0), (1, 1), (0, 2), (-1, 2), (-2, -2), (0, -3), (1, -3), (3, -2),
n = int(input())
answers = []
for i in range(n + 1):
answers.append((0, i))
print(len(answers))
for x, y in answers:
print(x, y)
n = int(input())
answers: list[tuple[int, int]] = []
for i in range(n + 1):
answers.append((0, i))
print(len(answers))
for x, y in answers:
print(x, y)
for _ in range(int(input())):
w = int(input())
xa, ya = map(int, input().split())
xb, yb = map(int, input().split())
xb -= w
yb -= w
d = ((xb - xa) ** 2 + (yb - ya) ** 2) ** 0.5
print(d + w)
import io
import csv
import sys
from PyQt6 import uic
from PyQt6 import QtCore, QtWidgets
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import QApplication, QWidget, QTableWidgetItem
FILENAME = 'price.csv'