Submission #66651350
Source Code Expand
Copy
#include <stdio.h>int main(void) {int A, B;int c, d, e;if (scanf("%d%d", &A, &B) != 2) return 1;c = A / B;d = c * B;e = d + B;printf("%d\n", c + (A - d > e - A));return 0;}
#include <stdio.h>
int main(void) {
int A, B;
int c, d, e;
if (scanf("%d%d", &A, &B) != 2) return 1;
c = A / B;
d = c * B;
e = d + B;
printf("%d\n", c + (A - d > e - A));
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Approximation |
| User | mikecat |
| Language | C (gcc 12.2.0) |
| Score | 150 |
| Code Size | 204 Byte |
| Status | AC |
| Exec Time | 0 ms |
| Memory | 1756 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 150 / 150 | ||||
| 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_handmade_03.txt, 01_handmade_04.txt, 01_handmade_05.txt, 01_handmade_06.txt, 02_random_07.txt, 02_random_08.txt, 02_random_09.txt, 02_random_10.txt, 02_random_11.txt, 02_random_12.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 0 ms | 1724 KiB |
| 00_sample_01.txt | AC | 0 ms | 1724 KiB |
| 00_sample_02.txt | AC | 0 ms | 1632 KiB |
| 01_handmade_03.txt | AC | 0 ms | 1732 KiB |
| 01_handmade_04.txt | AC | 0 ms | 1660 KiB |
| 01_handmade_05.txt | AC | 0 ms | 1652 KiB |
| 01_handmade_06.txt | AC | 0 ms | 1756 KiB |
| 02_random_07.txt | AC | 0 ms | 1640 KiB |
| 02_random_08.txt | AC | 0 ms | 1648 KiB |
| 02_random_09.txt | AC | 0 ms | 1640 KiB |
| 02_random_10.txt | AC | 0 ms | 1624 KiB |
| 02_random_11.txt | AC | 0 ms | 1588 KiB |
| 02_random_12.txt | AC | 0 ms | 1628 KiB |