Submission #23769509
Source Code Expand
a,b,c,d=map(int,input().split()) if b/c >= d: print(-1) else: print(a//(c*d-b) + (0 if a%(c*d-b)==0 else 1)) # a+b*i <= d*c*i # a <= (c*d-b)*i # a/(c*d-b) <= i
Submission Info
| Submission Time | |
|---|---|
| Task | B - Hydrate |
| User | ikekou |
| Language | Python (3.8.2) |
| Score | 200 |
| Code Size | 170 Byte |
| Status | AC |
| Exec Time | 28 ms |
| Memory | 9192 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 24 ms | 9164 KiB |
| 001.txt | AC | 22 ms | 9028 KiB |
| 002.txt | AC | 20 ms | 9024 KiB |
| 003.txt | AC | 26 ms | 8976 KiB |
| 004.txt | AC | 20 ms | 8872 KiB |
| 005.txt | AC | 23 ms | 9156 KiB |
| 006.txt | AC | 18 ms | 8872 KiB |
| 007.txt | AC | 22 ms | 8868 KiB |
| 008.txt | AC | 28 ms | 8868 KiB |
| 009.txt | AC | 26 ms | 9036 KiB |
| 010.txt | AC | 26 ms | 8976 KiB |
| example0.txt | AC | 21 ms | 9192 KiB |
| example1.txt | AC | 23 ms | 8860 KiB |