boj step 11 rework

This commit is contained in:
2024-04-05 02:23:36 +09:00
parent 4fd6c73be1
commit 948b520052
6 changed files with 59 additions and 0 deletions

18
zeta_C/completed/24313.c Normal file
View File

@@ -0,0 +1,18 @@
#include <stdio.h>
int main() {
int a1, a0, c, n0;
scanf("%d %d\n%d\n%d", &a1, &a0, &c, &n0);
int cond = 1;
for (int i = n0; i <= 100; i++) {
if (a1 * i + a0 > c * i) {
cond = 0;
break;
}
}
printf("%d\n", cond);
return 0;
}