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;
long long t, a, b, c, d, s, s1;
int main()
{
cin >> t;
while(t--)
{
cin >> a >> b >> c >> d;
s = s1 = 1;
for(int i = a; i <= b; ++i) s *= i;
for(int i = c; i <= d; ++i) s1 *= i;
if(s1 % s == 0) cout << "DA\n";
else cout << "NE\n";
}
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |