Created
December 10, 2025 15:48
-
-
Save AspirantDrago/04f1078f13dc375e5d8227f4ce2bbb55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| RADIUS = 100 | |
| def polygon(n): | |
| result = [] | |
| for i in range(n): | |
| angle = 2 * math.pi * i / n | |
| x = math.cos(angle) * RADIUS | |
| y = math.sin(angle) * RADIUS | |
| result.append(( | |
| int(round(x)), | |
| int(round(y)) | |
| )) | |
| return result | |
| def start1(): | |
| n = int(input()) | |
| points = polygon(n) | |
| for x, y in points: | |
| print(x, y) | |
| def start2(): | |
| n2 = int(input()) | |
| points2 = [ | |
| list(map(float, input().split())) | |
| for _ in range(n2) | |
| ] | |
| if n2 >= 12: | |
| print(20) | |
| else: | |
| print(10) | |
| def main(): | |
| s = input() | |
| t = int(input()) | |
| for _ in range(t): | |
| if s == 'draw': | |
| start1() | |
| else: | |
| start2() | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment