Submission #61796906
Source Code Expand
Copy
import mathr = int(input())ans = 0for i in range(1,r):y = i+0.5x = math.sqrt(r**2 - y**2)if x>0.5:x = int(x-0.5)ans += 4*x + 2y = 0.5x = math.sqrt(r**2 - y**2)if x>0.5:x = int(x-0.5)ans += 2*x + 1print(ans)
import math r = int(input()) ans = 0 for i in range(1,r): y = i+0.5 x = math.sqrt(r**2 - y**2) if x>0.5: x = int(x-0.5) ans += 4*x + 2 y = 0.5 x = math.sqrt(r**2 - y**2) if x>0.5: x = int(x-0.5) ans += 2*x + 1 print(ans)
Submission Info
Submission Time | |
---|---|
Task | D - Squares in Circle |
User | AKSLEGION |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 400 |
Code Size | 270 Byte |
Status | AC |
Exec Time | 73 ms |
Memory | 82608 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 55 ms | 76708 KB |
00_sample_01.txt | AC | 55 ms | 76728 KB |
00_sample_02.txt | AC | 55 ms | 76808 KB |
01_random_00.txt | AC | 61 ms | 81684 KB |
01_random_01.txt | AC | 71 ms | 82568 KB |
01_random_02.txt | AC | 65 ms | 81468 KB |
01_random_03.txt | AC | 72 ms | 82564 KB |
01_random_04.txt | AC | 66 ms | 81916 KB |
01_random_05.txt | AC | 67 ms | 82552 KB |
01_random_06.txt | AC | 70 ms | 82596 KB |
01_random_07.txt | AC | 60 ms | 81680 KB |
01_random_08.txt | AC | 68 ms | 82608 KB |
01_random_09.txt | AC | 58 ms | 81308 KB |
01_random_10.txt | AC | 71 ms | 82188 KB |
01_random_11.txt | AC | 71 ms | 82332 KB |
01_random_12.txt | AC | 71 ms | 82592 KB |
01_random_13.txt | AC | 72 ms | 82532 KB |
01_random_14.txt | AC | 73 ms | 82284 KB |
01_random_15.txt | AC | 72 ms | 82500 KB |
01_random_16.txt | AC | 72 ms | 82408 KB |
01_random_17.txt | AC | 72 ms | 82520 KB |
01_random_18.txt | AC | 72 ms | 82472 KB |
01_random_19.txt | AC | 73 ms | 82312 KB |
01_random_20.txt | AC | 56 ms | 76736 KB |
01_random_21.txt | AC | 72 ms | 82380 KB |