MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / floor_sum_slow

Function floor_sum_slow

code/mathematics/floor_sum.test.cpp:15–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 return cnt;
14}
15ll floor_sum_slow(ll n, ll a, ll b, ll c) {
16 if (c < 0) return 0;
17 ll cnt = 0;
18 for (ll x = 0; x <= n; x++) {
19 cnt += (c-a*x) / b + 1;
20 }
21 return cnt;
22}
23void test() {
24 rep(n,0,100) {
25 rep(a,1,100) rep(b,1,100) {

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected