Submission #6434559
Source Code Expand
def main(): N = int(input()) lo = 1 hi = 10000 while lo < hi: mid = (lo + hi) // 2 if mid * (1 + mid) // 2 < N: lo = mid + 1 else: hi = mid total = lo * (1 + lo) // 2 skip = total - N for i in range(1, lo+1): if i != skip: print(i) if __name__ == "__main__": main()
Submission Info
Submission Time | |
---|---|
Task | B - Exactly N points |
User | blcn |
Language | PyPy3 (2.4.0) |
Score | 300 |
Code Size | 387 Byte |
Status | AC |
Exec Time | 202 ms |
Memory | 42476 KB |
Judge Result
Set Name | sample | dataset1 | dataset2 | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | 100 / 100 | ||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
sample | sample-01.txt, sample-02.txt, sample-03.txt |
dataset1 | sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt |
dataset2 | sample-01.txt, sample-02.txt, sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt, 02-07.txt, 02-08.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 163 ms | 38256 KB |
01-02.txt | AC | 166 ms | 38256 KB |
01-03.txt | AC | 161 ms | 38256 KB |
01-04.txt | AC | 163 ms | 38256 KB |
01-05.txt | AC | 162 ms | 38256 KB |
01-06.txt | AC | 161 ms | 38256 KB |
01-07.txt | AC | 162 ms | 38384 KB |
01-08.txt | AC | 166 ms | 38256 KB |
01-09.txt | AC | 162 ms | 38256 KB |
01-10.txt | AC | 162 ms | 38256 KB |
02-01.txt | AC | 193 ms | 41072 KB |
02-02.txt | AC | 194 ms | 41200 KB |
02-03.txt | AC | 199 ms | 41072 KB |
02-04.txt | AC | 195 ms | 41072 KB |
02-05.txt | AC | 194 ms | 41072 KB |
02-06.txt | AC | 202 ms | 42476 KB |
02-07.txt | AC | 196 ms | 42220 KB |
02-08.txt | AC | 199 ms | 41072 KB |
sample-01.txt | AC | 163 ms | 38256 KB |
sample-02.txt | AC | 164 ms | 38256 KB |
sample-03.txt | AC | 162 ms | 38256 KB |