Submission #26162324
Source Code Expand
A, B, C = map(int, input().split())
if B < C:
print(-1)
elif A == C or B == C:
print(C)
elif A < C and C < B :
print(C)
elif C < A:
i = 0
num = 0
while A > num:
num = C * i
i += 1
if num <= B:
print(num)
else:
print(-1)
Submission Info
| Submission Time | |
|---|---|
| Task | A - Find Multiple |
| User | hanaseleb |
| Language | Python (3.8.2) |
| Score | 100 |
| Code Size | 297 Byte |
| Status | AC |
| Exec Time | 26 ms |
| Memory | 8956 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| 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, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 21 ms | 8780 KiB |
| 001.txt | AC | 24 ms | 8768 KiB |
| 002.txt | AC | 19 ms | 8956 KiB |
| 003.txt | AC | 21 ms | 8812 KiB |
| 004.txt | AC | 19 ms | 8816 KiB |
| 005.txt | AC | 19 ms | 8776 KiB |
| 006.txt | AC | 26 ms | 8860 KiB |
| 007.txt | AC | 20 ms | 8808 KiB |
| example0.txt | AC | 20 ms | 8900 KiB |
| example1.txt | AC | 23 ms | 8816 KiB |