cf/mirror

Decrease the Sum of Digits

CF
1409D1500· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
2 1
1 1
500 4
217871987498122 10
100000000000000001 1
Output
8
0
500
2128012501878
899999999999999999
1409D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)