Coprime Subsequences
803F2000· candidate master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
31 2 3
Output
5
Sample 2of 3
Input
41 1 1 1
Output
15
Sample 3of 3
Input
71 3 5 15 3 105 35
Output
100
58%
803F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)