# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
159748 | geon040702 | 방 배정하기 (KOI17_room) | C++14 | 2 ms | 428 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int student;
int a, b, c;
int main(void)
{
int i, j, k, res=0;
scanf("%d%d%d%d", &a, &b, &c, &student);
for(i=0;i<=student/a;i++) {
for(j=0;j<=student/b;j++) {
for(k=0;k<=student/c;k++) {
if(student == (a*i)+(b*j)+(c*k)) {
res = 1;
}
}
}
}
printf("%d\n", res);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |