Factorial Divisibility
1753B1600· expert2s256 MB⌨ stdin/stdout
Examples
Sample 1of 5
Input
6 43 2 2 2 3 3
Output
Yes
Sample 2of 5
Input
8 33 2 2 2 2 2 1 1
Output
Yes
Sample 3of 5
Input
7 87 7 7 7 7 7 7
Output
No
Sample 4of 5
Input
10 54 3 2 1 4 3 2 4 3 4
Output
No
Sample 5of 5
Input
2 500000499999 499999
Output
No
58%
1753B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)