boj step 11 rework
This commit is contained in:
9
zeta_C/completed/24263.c
Normal file
9
zeta_C/completed/24263.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
int n;
|
||||
scanf("%d", &n);
|
||||
printf("%d\n%d\n", n, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
8
zeta_C/completed/24264.c
Normal file
8
zeta_C/completed/24264.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
long long n;
|
||||
scanf("%lld", &n);
|
||||
printf("%lld\n%d\n", n * n, 2);
|
||||
return 0;
|
||||
}
|
||||
8
zeta_C/completed/24265.c
Normal file
8
zeta_C/completed/24265.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
long long n;
|
||||
scanf("%lld", &n);
|
||||
printf("%lld\n%d\n", n * (n - 1L) / 2L, 2);
|
||||
return 0;
|
||||
}
|
||||
8
zeta_C/completed/24266.c
Normal file
8
zeta_C/completed/24266.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
long long n;
|
||||
scanf("%lld", &n);
|
||||
printf("%lld\n%d\n", n * n * n, 3);
|
||||
return 0;
|
||||
}
|
||||
8
zeta_C/completed/24267.c
Normal file
8
zeta_C/completed/24267.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
long long n;
|
||||
scanf("%lld", &n);
|
||||
printf("%lld\n%d\n", n * (n - 1L) * (n - 2L) / 6L, 3);
|
||||
return 0;
|
||||
}
|
||||
18
zeta_C/completed/24313.c
Normal file
18
zeta_C/completed/24313.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user