Skip to content

Commit

Permalink
feat: floor sum function
Browse files Browse the repository at this point in the history
  • Loading branch information
ttamx committed Sep 21, 2024
1 parent 0cafe8c commit 47447f8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions verify/yosupo/number-theory/sum_of_floor_of_linear.test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#define PROBLEM "https://judge.yosupo.jp/problem/sum_of_floor_of_linear"
#include "template.hpp"
#include "number-theory/floor-sum.hpp"

int main(){
cin.tie(nullptr)->sync_with_stdio(false);
int t;
cin >> t;
while(t--){
ll n,m,a,b;
cin >> n >> m >> a >> b;
cout << floor_sum(a,b,m,n-1) << "\n";
}
}

0 comments on commit 47447f8

Please sign in to comment.