#P7281. [COCI 2020/2021 #4] Vepar
[COCI 2020/2021 #4] Vepar
Description
Given two sets of positive integers and , determine whether is divisible by .
Input Format
The first line contains an integer , which indicates the number of test cases.
In the next lines, four integers are given.
Output Format
Output lines in total. For the -th line, if is divisible by , output DA; otherwise, output NE.
2
9 10 3 6
2 5 7 9
DA
NE
6
1 2 3 4
1 4 2 3
2 3 1 4
1 3 2 4
19 22 55 57
55 57 19 22
DA
NE
DA
DA
DA
DA
Hint
Explanation for Sample 1
According to the statement, multiplying the numbers gives and . Since is divisible by , output DA.
We get and . Since is not divisible by , output NE.
Constraints and Specifications
This problem does not use bundled evaluation. You can get the corresponding score by passing the corresponding subtasks, but there are several constraints.
| Constraint ID | Score | Constraints and Specifications |
|---|---|---|
| None |
For of the testdata, , , .
Notes
The score of this problem follows the original COCI settings, with a full score of .
Translated from COCI2020-2021 CONTEST #4 T2 Vepar.
Translated by ChatGPT 5
京公网安备 11011102002149号