aboutsummaryrefslogtreecommitdiff
path: root/contests/08-03-2022(Div.3)/B_DIV_MOD
diff options
context:
space:
mode:
Diffstat (limited to 'contests/08-03-2022(Div.3)/B_DIV_MOD')
-rwxr-xr-xcontests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp b/contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp
deleted file mode 100755
index f861b3b..0000000
--- a/contests/08-03-2022(Div.3)/B_DIV_MOD/B_DIV_MOD.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include<bits/stdc++.h>
-
-using namespace std;
-
-int modDiv(int r, int a){
- // law r % a == 0, return r-1 % a + r-1 /a, else return r % a + r /a;
- if(r % a == 0){
- return (r-1) % a + (r-1)/a;
- }
- return r % a + r / a;
-}
-
-int main(){
- int tt;
- cin >> tt;
- while(tt--){
- int l, r, a;
- cin >> l >> r >> a;
- cout << modDiv(r, a) << endl;
- }
-
- return 0;
-}