buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> using namespace std; int main() { int L; int R; int d; cin >> L >> R >> d; cout << R / d - L / d << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int L; int R; int d; cin >> L >> R >> d; cout << R / d - (L - 1) / d << endl; return 0; }
[["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25]]
1
44
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int add = 0; if (a % c == 0) { add++; } System.out.println((b / c) - (a / c) - add); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int add = 0; if (a % c == 0) { add++; } System.out.println((b / c) - (a / c) + add); } }
[["-", 0, 1, 0, 492, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72]]
3
101
#include <bits/stdc++.h> using namespace std; #define LL long long int main() { LL L, R, D, A; cin >> L >> R >> D; A = R / D - L / D; if (L == D) { A = R / D - L / D + 1; } if (A < 0) { A = 0; } cout << A << endl; }
#include <bits/stdc++.h> using namespace std; #define LL long long int main() { LL L, R, D, A; cin >> L >> R >> D; A = R / D - L / D; if (L % D == 0) { A = R / D - L / D + 1; } if (A < 0) { A = 0; } cout << A << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
80
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 100005; int main() { ios::sync_with_stdio(false); int n, m, k; cin >> n >> m >> k; int cnt = 0; for (int i = n; i < m; i++) if (i % k == 0) cnt++; cout << cnt << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 100005; int main() { ios::sync_with_stdio(false); int n, m, k; cin >> n >> m >> k; int cnt = 0; for (int i = n; i <= m; i++) if (i % k == 0) cnt++; cout << cnt << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
79
L, R, d = map(int, input().split()) num_lower = int(L / d) num_upper = int(R / d) ans = num_upper - num_lower print(ans)
L, R, d = map(int, input().split()) num_lower = int((L - 1) / d) num_upper = int(R / d) ans = num_upper - num_lower print(ans)
[["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25]]
5
43
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int R = sc.nextInt(); int d = sc.nextInt(); if (L == d) { System.out.println(R / d - L / d + 1); } else { System.out.println(R / d - L / d); ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int R = sc.nextInt(); int d = sc.nextInt(); if (L % d == 0) { System.out.println(R / d - L / d + 1); } else { System.out.println(R / d - L / d...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 109], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 60], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]]
3
105
L, R, d = map(int, input().split()) count = 0 for i in range(L-1,R): if i%d == 0: count+=1 print(count)
L, R, d = map(int, input().split()) count = 0 for i in range(L,R+1): if i%d == 0: count+=1 print(count)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
47
L,R,d = map(int,input().split()) count = 0 tmp = 0 while(True): if tmp <= L: tmp = tmp + d elif L <= tmp and tmp<= R: count += 1 tmp = tmp + d else: break if d == 1: print(R- L + 1) else: print(count)
L,R,d = map(int,input().split()) count = 0 tmp = 0 while(True): if tmp < L: tmp = tmp + d elif L <= tmp and tmp<= R: count += 1 tmp = tmp + d else: break if d == 1: print(R- L + 1) else: print(count)
[["-", 0, 52, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 52, 8, 196, 0, 57, 15, 666, 667, 18]]
5
78
L,R,d =map(int,input().split()) if L == d: print(R//d - L//d + 1) else: print(R//d - L//d)
L,R,d =map(int,input().split()) if L%d == 0: print(R//d - L//d + 1) else: print(R//d - L//d)
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 60], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]]
5
47
#include <bits/stdc++.h> using namespace std; int main() { int L, R, D; cin >> L >> R >> D; int ans = 0; for (int i = L; i <= R; i++) { if (i % D) ans++; } cout << ans << "\n"; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R, D; cin >> L >> R >> D; int ans = 0; for (int i = L; i <= R; i++) { if (i % D == 0) ans++; } cout << ans << "\n"; }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
65
#include <iostream> using namespace std; int main() { int l, r, d, c = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (d % i == 0) c++; } cout << c << endl; }
#include <iostream> using namespace std; int main() { int l, r, d, c = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (i % d == 0) c++; } cout << c << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
64
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int count = 0; for (int i = L; L <= R; L++) { if (i % d == 0) { count++; } } cout << count; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int count = 0; for (int i = L; i <= R; i++) { if (i % d == 0) { count++; } } cout << count; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22]]
1
65
L,R,d = map(int,input().split()) n = L//d m = R//d if n%d == 0: ans = m-n+1 else: ans = m-n print(ans)
L,R,d = map(int,input().split()) n = L//d m = R//d if L%d == 0: ans = m-n+1 else: ans = m-n print(ans)
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22]]
5
53
#include <iostream> using namespace std; int main() { int a; int b; int c; cin >> a >> b >> c; int count = 0; for (int i = a; i <= b; i++) { if (c % i == 0) count++; } cout << count; }
#include <iostream> using namespace std; int main() { int a; int b; int c; cin >> a >> b >> c; int count = 0; for (int i = a; i <= b; i++) { if (i % c == 0) count++; } cout << count; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
65
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int x = l / d; int y = r / d; if (x % d == 0) { cout << y - x + 1 << endl; } else { cout << y - x << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int x = l / d; int y = r / d; if (l % d == 0) { cout << y - x + 1 << endl; } else { cout << y - x << endl; } }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]]
1
72
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; cout << (r / d - l / d); }
#include <algorithm> #include <cmath> #include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; cout << (r / d - (l - 1) / d); }
[["+", 12, 23, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 16, 12, 16, 31, 23, 0, 25]]
1
43
import math L, R, d = map(int, input().parse()) num = 0 start_d = int(math.ceil(L / d)) end_d = int(math.floor(R / d)) print(end_d - start_d +1)
# -*- coding: utf-8 -*- import math #L, R, d = map(int, input().parse()) L, R, d = map(int, input().split()) start_d = int(math.ceil(L / d)) end_d = int(math.floor(R / d)) print(end_d - start_d +1)
[["-", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]]
5
57
L, R, d= int(input().split()) counter=0 for i in range(R+1-L): num = i+L if num%d == 0: counter+=1 print(counter)
L, R ,d= map(int,input().split()) counter=0 for i in range(R+1-L): num = i+L if num%d == 0: counter+=1 print(counter)
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21]]
5
50
#include <bits/stdc++.h> using namespace std; int main() { int p, q, d; cin >> p >> q >> d; cout << (q / d) - (p / d) << "\n"; }
#include <bits/stdc++.h> using namespace std; int main() { int p, q, d; cin >> p >> q >> d; cout << (q / d) - ((p - 1) / d) << "\n"; }
[["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 25]]
1
45
l, r, d = map(int,input().split()) gap = (l+d)%d if gap > r-l: print(0) else: print(1 + (r-l-gap)//d)
l, r, d = map(int,input().split()) gap = (d-l%d)%d if gap > r-l: print(0) else: print(1 + (r-l-gap)//d)
[["+", 0, 662, 12, 657, 31, 23, 0, 657, 31, 22], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["-", 0, 662, 12, 657, 31, 23, 0, 657, 17, 72], ["+", 12, 657, 31, 23, 0, 657, 12, 657, 17, 109]]
5
54
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define MOD 1000000007; using namespace std; using ll = long long; int main() { int l, r, d; cin >> l >> r >> d; int ans = l / d - r / d; if (r % d == 0) ans++; cout << ans << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define MOD 1000000007; using namespace std; using ll = long long; int main() { int l, r, d; cin >> l >> r >> d; int ans = r / d - l / d; if (l % d == 0) ans++; cout << ans << endl; return 0; }
[["-", 0, 43, 49, 50, 51, 16, 31, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]]
1
75
#include <iostream> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; if (R == 1) { cout << L / d << endl; } else { cout << L / d - (R - 1) / d << endl; } }
#include <iostream> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; if (R == 1) { cout << R / d << endl; } else { cout << R / d - (L - 1) / d << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["-", 12, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 31, 22]]
1
62
from math import * l,r,d=map(int,input().split()) c=l//d k=r//d ans=k-c print(ans)
from math import * l,r,d=map(int,input().split()) c=(l-1)//d k=r//d ans=k-c print(ans)
[["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
41
a=list(map(int,input().split())) count=0 for i in range(a[0],a[1]): if i%a[2]==0: count+=1 print(count)
a=list(map(int,input().split())) count=0 for i in range(a[0],a[1]+1): if i%a[2]==0: count+=1 print(count)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
53
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); int r = sc.nextInt(); int d = sc.nextInt(); int res = 0; for (int i = l; i < r; i++) { if (i % d == 0) res++; } System.out.println...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int l = sc.nextInt(); int r = sc.nextInt(); int d = sc.nextInt(); int res = 0; for (int i = l; i <= r; i++) { if (i % d == 0) res++; } System.out.printl...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
103
#include <iostream> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int count = 0; for (int i = R; i <= L; i++) { if (i % d == 0) { count++; } } cout << count << endl; }
#include <iostream> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int count = 0; for (int i = L; i <= R; i++) { if (i % d == 0) { count++; } } cout << count << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
67
l,r,d=gets.split(' ').map(&:to_i) sum=0 (r-l+1).times do |i| sum+=1 if (i+r)%d==0 end p sum
l,r,d=gets.split(' ').map(&:to_i) sum=0 (r-l+1).times do |i| sum+=1 if (i+l)%d==0 end p sum
[["-", 15, 738, 31, 738, 31, 739, 0, 738, 12, 22], ["+", 15, 738, 31, 738, 31, 739, 0, 738, 12, 22]]
4
52
a = list(map(int,input().split())) x = (a[1] // a[2]) - (a[0] // a[2]) print (x)
a = list(map(int,input().split())) x = (a[1] // a[2]) - ((a[0] - 1) // a[2]) print (x)
[["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 24], ["+", 12, 23, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 12, 23, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 25]]
5
46
a,b,c=map(int,input().split()) if c%a == 0: d=b//c - a//c +1 else: d=b//c - a//c print(d)
a,b,c=map(int,input().split()) if a%c == 0: d=b//c - a//c +1 else: d=b//c - a//c print(d)
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22]]
5
51
l, r, d = map(int, input().split()) ans = 0 for num in range(l, r+1): if num & d == 0: ans += 1 print(ans)
l, r, d = map(int, input().split()) ans = 0 for num in range(l, r+1): if num % d == 0: ans += 1 print(ans)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 67], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109]]
5
47
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < = n; i++) #define REP(i, n) for (int i = 0; i <= n; i++) #define ll long long using namespace std; int keta(int n) { int res; for (int i = 0; i < 100; i++) { n = n / 10; if (n == 0) { res = i + 1; break; } } return res; } i...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < = n; i++) #define REP(i, n) for (int i = 0; i <= n; i++) #define ll long long using namespace std; int keta(int n) { int res; for (int i = 0; i < 100; i++) { n = n / 10; if (n == 0) { res = i + 1; break; } } return res; } i...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22]]
1
135
#include <bits/stdc++.h> #define int long long using namespace std; const int N = 1e5 + 2; int t, n, m, k, L, R, d; int32_t main() { cin >> L >> R >> d; int cnt = 0; for (int i = L; i <= R; i++) if (i % d) cnt++; cout << cnt << endl; }
#include <bits/stdc++.h> #define int long long using namespace std; const int N = 1e5 + 2; int t, n, m, k, L, R, d; int32_t main() { cin >> L >> R >> d; int cnt = 0; for (int i = L; i <= R; i++) if (i % d == 0) cnt++; cout << cnt << endl; }
[["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 12, 13]]
1
80
import java.util.*; class Main { public static void main1(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int R = sc.nextInt(); int d = sc.nextInt(); System.out.println(R / d - (L - 1) / d); } }
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int L = sc.nextInt(); int R = sc.nextInt(); int d = sc.nextInt(); System.out.println(R / d - (L - 1) / d); } }
[["-", 0, 493, 0, 235, 8, 498, 0, 195, 141, 22], ["+", 0, 493, 0, 235, 8, 498, 0, 195, 141, 22]]
3
80
L, R, d=map(int,input().split()) if d == 1: print(R//d - L//d +1) else: print(R//d-L//d)
L, R, d=map(int,input().split()) if L%d==0: print(R//d - L//d +1) else: print(R//d-L//d)
[["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 612]]
5
47
import math from collections import * import sys inp=sys.stdin.readline def linp(x): return list(map(int,x.split())) def minp(x): return map(int,x.split()) def main(): l,r,d = minp(inp()) rem = l%d l += d-rem if l>r: print(0) else: c=0 while l<=r: c+...
import math from collections import * import sys inp=sys.stdin.readline def linp(x): return list(map(int,x.split())) def minp(x): return map(int,x.split()) def main(): l,r,d = minp(inp()) rem = l%d if rem!=0: l += d-rem if l>r: print(0) else: c=0 while l...
[["+", 0, 656, 0, 14, 8, 196, 0, 57, 0, 121], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 79], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 656, 0, 14, 8, 196, 0, 57, 0, 102]]
5
118
#include <iostream> using namespace std; int main() { int l, r, d; std::cin >> l >> r >> d; int ans = r / d - l / d; if (l == d) ans += 1; std::cout << ans << '\n'; return 0; }
#include <iostream> using namespace std; int main() { int l, r, d; std::cin >> l >> r >> d; int ans = r / d - l / d; if (l % d == 0) ans += 1; std::cout << ans << '\n'; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
63
L, R, d = [int(s) for s in input().split()] print(R // d - L // d)
L, R, d = [int(s) for s in input().split()] print(R // d - (L-1) // d)
[["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 24], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 25]]
5
32
#include <iostream> using namespace std; int main() { int l, r, d, i; int count = 0; cin >> l >> r >> d; for (i = l; i <= d; i++) { if (i % d == 0) count++; } cout << count; }
#include <iostream> using namespace std; int main() { int l, r, d, i; int count = 0; cin >> l >> r >> d; for (i = l; i <= r; i++) { if (i % d == 0) count++; } cout << count; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
64
import math l, r, d = map(int, input().split()) if l % d == 0: if r % d == 0: print(math.floor(r/d) - math.floor(r/d) + 1) else: print(math.floor(r/d) - math.floor(r/d) + 1) else: if r % d == 0: print(math.floor(r/d) - math.floor(r/d)) else: print(math.floor(r/d) - math.floor(r/d))
import math l, r, d = map(int, input().split()) if l % d == 0: if r % d == 0: print(math.floor(r/d) - math.floor(l/d) + 1) else: print(math.floor(r/d) - math.floor(l/d) + 1) else: if r % d == 0: print(math.floor(r/d) - math.floor(l/d)) else: print(math.floor(r/d) - math.floor(l/d))
[["-", 31, 657, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 31, 657, 12, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 657, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 657, 12, 652, 3, 4, 0, 657, 31, 22]]
5
131
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int L = scanner.nextInt(); int R = scanner.nextInt(); int d = scanner.nextInt(); int ans = 0; for (int i = L; i < R; i++) { if (i % d == 0) ans++; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int L = scanner.nextInt(); int R = scanner.nextInt(); int d = scanner.nextInt(); int ans = 0; for (int i = L; i <= R; i++) { if (i % d == 0) ans++; ...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
103
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int l = kbd.nextInt(); int r = kbd.nextInt(); int d = kbd.nextInt(); int a = l / d; int b = r / d; System.out.println(b - a); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner kbd = new Scanner(System.in); int l = kbd.nextInt(); int r = kbd.nextInt(); int d = kbd.nextInt(); int a = (l - 1) / d; int b = r / d; System.out.println(b - a); } }
[["+", 0, 503, 49, 200, 51, 16, 31, 23, 0, 24], ["+", 49, 200, 51, 16, 31, 23, 0, 16, 17, 33], ["+", 49, 200, 51, 16, 31, 23, 0, 16, 12, 499], ["+", 0, 503, 49, 200, 51, 16, 31, 23, 0, 25]]
3
87
l,r,d=map(int,input().split()) rr=r//d ll=l//d print(rr-ll)
l,r,d=map(int,input().split()) rr=r//d ll=(l-1)//d print(rr-ll)
[["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
34
#include <iostream> using namespace std; int main() { int L; int R; int d; cin >> L >> R >> d; int h = R / d; int i = L / d + 1; cout << R / d - L / d << '\n'; }
#include <iostream> using namespace std; int main() { int L; int R; int d; cin >> L >> R >> d; int h = R / d; int i = L / d + 1; cout << R / d - (L - 1) / d << '\n'; }
[["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25]]
1
59
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <numeric> #define ll long long #define ull unsigned long #define mpa make_pair #define pb push_back #define ff first #define pii pair<ll, ll> #define dd double #define trace(x) cerr << #x << " : " << x << endl #define ss second #define boost ios_ba...
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <numeric> #define ll long long #define ull unsigned long #define mpa make_pair #define pb push_back #define ff first #define pii pair<ll, ll> #define dd double #define trace(x) cerr << #x << " : " << x << endl #define ss second #define boost ios_ba...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
198
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int solve() {} int main() { int l, r, d; cin >> l >> r >> d; int cnt = 0; rep(i, r - l + 1) { if ((r + i) % d == 0) cnt++; } cout << cnt << endl; }
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; int solve() {} int main() { int l, r, d; cin >> l >> r >> d; int cnt = 0; rep(i, r - l + 1) { if ((l + i) % d == 0) cnt++; } cout << cnt << endl; }
[["-", 51, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 31, 22]]
1
86
l,r,d=map(int, input().split()) sum = 0 for i in range(l,r+1): if i % 2 == 0: sum += 1 print(sum)
l,r,d=map(int, input().split()) sum = 0 for i in range(l,r+1): if i % d == 0: sum += 1 print(sum)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]]
5
47
#include <bits/stdc++.h> #include <cmath> #include <math.h> #include <stdio.h> using namespace std; #define vsort(vec) sort(vec.begin(), vec.end()) #define vreverse(vec) reverse(vec.begin(), vec.end()) using ll = long long; using ull = unsigned long long; const ll INF = 1001001001; const double PI = 3.14159265358979323...
#include <bits/stdc++.h> #include <cmath> #include <math.h> #include <stdio.h> using namespace std; #define vsort(vec) sort(vec.begin(), vec.end()) #define vreverse(vec) reverse(vec.begin(), vec.end()) using ll = long long; using ull = unsigned long long; const ll INF = 1001001001; const double PI = 3.14159265358979323...
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
187
L,R,d=list(map(int,input().split())) out=0 minn=R for i in range(L,R+1): if i%d==0: minn=i break for i in range(minn,R+1,d): out+=1 print(out)
L,R,d=list(map(int,input().split())) out=0 minn=R+1 for i in range(L,R+1): if i%d==0: minn=i break for i in range(minn,R+1,d): out+=1 print(out)
[["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612]]
5
71
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> oset; #define sim template <class c #defi...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; typedef tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update> oset; #define sim template <class c #defi...
[["-", 28, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["-", 28, 2, 3, 4, 0, 16, 31, 16, 17, 109], ["+", 28, 2, 3, 4, 0, 16, 31, 16, 17, 109], ["+", 28, 2, 3, 4, 0, 16, 31, 16, 12, 22]]
1
425
L, R, d = map(int, input().split()) ans = 0 for i in range(L, R+1, 1): print(i) if i % d == 0: ans += 1 print(ans)
L, R, d = map(int, input().split()) ans = 0 for i in range(L, R+1, 1): if i % d == 0: ans += 1 print(ans)
[["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
53
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) using namespace std; typedef long long ll; int main() { ll l, r, d; cin >> l >> r >> d; cout << l / d - (r - 1) / d << endl; return 0; }
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) using namespace std; typedef long long ll; int main() { ll l, r, d; cin >> l >> r >> d; cout << r / d - (l - 1) / d << endl; return 0; }
[["-", 0, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["-", 12, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 31, 22]]
1
65
L, R, d = map(int, input().split()) print(int(R / d) - int(L - 1 / d))
L, R, d = map(int, input().split()) print(int(R / d) - int((L - 1) / d))
[["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25]]
5
36
#include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; for (int i = l; i <= r; i++) { if (i % r == 0) ans++; } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; for (int i = l; i <= r; i++) { if (i % d == 0) ans++; } cout << ans << endl; return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
68
#include <bits/stdc++.h> using namespace std; #define ALL(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int l, r, d; cin >> l >> r >> d; int t = 0; for (int i = l; i < r; i++) { if (i % d == 0) { t++; } } cout << t << endl; }
#include <bits/stdc++.h> using namespace std; #define ALL(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int l, r, d; cin >> l >> r >> d; int t = 0; for (int i = l; i <= r; i++) { if (i % d == 0) { t++; } } cout << t << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
81
L, R, d = map(int, input().split()) count = 0 for i in range(L, R+1, 1): if i % 2 == 0: count += 1 print(count)
L, R, d = map(int, input().split()) count = 0 for i in range(L, R+1, 1): if i % d == 0: count += 1 print(count)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]]
5
49
#include <bits/stdc++.h> #define ll long long #define ld long double #define ull unsigned long long #define mp make_pair #define pb(x) push_back(x) #define vi vector<int> #define vs vector<string> #define vll vector<long long> #define vc vector<char> #define vs vector<string> #define pii pair<int, int> #define pll pair...
#include <bits/stdc++.h> #define ll long long #define ld long double #define ull unsigned long long #define mp make_pair #define pb(x) push_back(x) #define vi vector<int> #define vs vector<string> #define vll vector<long long> #define vc vector<char> #define vs vector<string> #define pii pair<int, int> #define pll pair...
[["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62]]
1
123
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { int a, b, c; int count = 0; int i; cin >> a >> b >> c; for (i = a; i < b; i++) { if (i % c == 0) { count++; } } cout << count << endl; }
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { int a, b, c; int count = 0; int i; cin >> a >> b >> c; for (i = a; i <= b; i++) { if (i % c == 0) { count++; } } cout << count << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
71
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ui unsigned int #define us unsigned short #define IOS ios_base::sync_with_stdio(0); #define INF LONG_MAX #define PI 3.1415926535897932384626 #define mp make_pair #define fi first #define se second #define pb push_b...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ui unsigned int #define us unsigned short #define IOS ios_base::sync_with_stdio(0); #define INF LONG_MAX #define PI 3.1415926535897932384626 #define mp make_pair #define fi first #define se second #define pb push_b...
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
210
/*Author - sambhu show(jgec) */ #include <bits/stdc++.h> using namespace std; #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define itc ...
/*Author - sambhu show(jgec) */ #include <bits/stdc++.h> using namespace std; #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define itc ...
[["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 33], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25]]
1
201
import math a,b,d = map(int,input().split()) c=0 for i in range(l,r+1): if i%d==0: c+=1 print(c)
import math a,b,d = map(int,input().split()) c=0 for i in range(a,b+1): if i%d==0: c+=1 print(c)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22]]
5
49
#include <iostream> using namespace std; int main() { int l, r, d, count = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (l % d == 0) { count++; } } cout << count; return 0; }
#include <iostream> using namespace std; int main() { int l, r, d, count = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (i % d == 0) { count++; } } cout << count; return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]]
1
67
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define repa(i, a, n) for (int i = (a); i < (n); i++) #define rrep(i, n) for (int i = n - 1; i >= 0; i--) #define rrepa(i, a, n) for (int i = n - 1; i >= (a); i--) #define all(a) (a).begin(), (a).end() #define MOD 1000000007...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define repa(i, a, n) for (int i = (a); i < (n); i++) #define rrep(i, n) for (int i = n - 1; i >= 0; i--) #define rrepa(i, a, n) for (int i = n - 1; i >= (a); i--) #define all(a) (a).begin(), (a).end() #define MOD 1000000007...
[["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 16, 12, 23, 0, 16, 31, 23, 0, 25]]
1
177
#include <bits/stdc++.h> using namespace std; int main(void) { int L, R, d; cin >> L >> R >> d; int score = 0; for (int i = L; i < R; ++i) { if (i % d == 0) ++score; } cout << score << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int L, R, d; cin >> L >> R >> d; int score = 0; for (int i = L; i <= R; ++i) { if (i % d == 0) ++score; } cout << score << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
69
//*******Abhijit Burman***********// // Jalpaiguri Government Engineering College// #include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define ff first #define ss second #define mk make_pair #define MAXX (1000000000000000000 + 7) #define fio ...
//*******Abhijit Burman***********// // Jalpaiguri Government Engineering College// #include <bits/stdc++.h> using namespace std; #define ll long long int #define pb push_back #define ff first #define ss second #define mk make_pair #define MAXX (1000000000000000000 + 7) #define fio ...
[["+", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
416
l, r, d = gets.split.map(&:to_i) ans = 0 (l..r).each do |i| ans += 1 if i % 2 == 0 end p ans
l, r, d = gets.split.map(&:to_i) ans = 0 (l..r).each do |i| ans += 1 if i % d == 0 end p ans
[["-", 8, 736, 0, 751, 15, 738, 31, 738, 12, 612], ["+", 8, 736, 0, 751, 15, 738, 31, 738, 12, 22]]
4
41
A,B,C = map(int,input().split()) print(B//C-(A//C))
A,B,C = map(int,input().split()) print(B//C-(A-1)//C)
[["+", 0, 657, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 25], ["-", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]]
5
30
l, r, d = map(int, input().split()) a = r//d b = l//d if b%d==0: print(a-b+1) else: print(a-b)
l, r, d = map(int, input().split()) a = r//d b = l//d if l%d==0: print(a-b+1) else: print(a-b)
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22]]
5
51
l, r, d = map(int, input().split()) cnt = 0 for i in range(l, r+1): if i % 7 == 0: cnt = cnt + 1 print(cnt)
l, r, d = map(int, input().split()) cnt = 0 for i in range(l, r+1): if i % d == 0: cnt = cnt + 1 print(cnt)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22]]
5
49
#include <algorithm> #include <bits/stdc++.h> #include <chrono> #include <iomanip> #include <map> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <thread> #include <typeinfo> #include <vector> // define #define trav(i, v) for (auto i : v) #define rep(i, n) for (int i = 0; i < n; i...
#include <algorithm> #include <bits/stdc++.h> #include <chrono> #include <iomanip> #include <map> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <thread> #include <typeinfo> #include <vector> // define #define trav(i, v) for (auto i : v) #define rep(i, n) for (int i = 0; i < n; i...
[["-", 0, 57, 15, 339, 51, 16, 31, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
393
#include <bits/stdc++.h> using namespace std; #define el "\n" #define rep(i, a, n) for (int i = 0; i < n; ++i) int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; rep(i, l, r + 1) { if (i % d == 0) ans++; } cout << ans << el; return 0; }
#include <bits/stdc++.h> using namespace std; #define el "\n" #define rep(i, a, n) for (int i = a; i < n; ++i) int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; rep(i, l, r + 1) { if (i % d == 0) ans++; } cout << ans << el; return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]]
1
78
L, R, d = (int(x) for x in input().split()) a = L // d b = R // d if R % d == 0: b += 1 print(b - a)
L, R, d = (int(x) for x in input().split()) a = L // d b = R // d if L % d == 0: b += 1 print(b - a)
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 31, 22]]
5
48
l,r,d=map(input().split("")) c=0 for i in range(l,r+1,1): if i%d==0: c+=1 print(c)
l,r,d=map(int,input().split(" ")) c=0 for i in range(l,r+1,1): if i%d==0: c+=1 print(c)
[["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 3, 4, 0, 652, 3, 4, 0, 557, 0, 6]]
5
49
L,R,N = map(int,input().split()) Ln = L//N Rn = R//N print(Rn-Ln+1)
L,R,N = map(int,input().split()) Ln = (L-1)//N Rn = R//N print(Rn-Ln)
[["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]]
5
36
l, r, d = map(int, input().split()) cnt = 0 for i in range(r - l + 1): if (r + i) % d == 0: cnt += 1 print(cnt)
l, r, d = map(int, input().split()) cnt = 0 for i in range(r - l + 1): if (l + i) % d == 0: cnt += 1 print(cnt)
[["-", 15, 666, 0, 657, 31, 23, 0, 657, 31, 22], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 31, 22]]
5
51
#include <bits/stdc++.h> #define ll long long #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); using namespac...
#include <bits/stdc++.h> #define ll long long #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); using namespac...
[["-", 0, 16, 12, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 16, 12, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 16, 12, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 16, 12, 16, 31, 16, 12, 16, 31, 22], ["-", 12, 16, 12, 23, 0, 41, 15, 16, 31, 22], ["+", 12, 23, 0, 41, 15, 16, 31, 16, 31, 22], ["+", 12, 16, 12, 23, 0, 41, 15, 16, 17, 60...
1
55
l, r, d = [int(x) for x in input().split()] count = 0 for i in range(l, r+1): if not l%d: count += 1 print(count)
l, r, d = [int(x) for x in input().split()] count = 0 for i in range(l, r+1): if not i%d: count += 1 print(count)
[["-", 8, 196, 0, 57, 15, 681, 28, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 681, 28, 657, 31, 22]]
5
50
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int ans = R / d - L / d; cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int ans = R / d - (L - 1) / d; cout << ans << endl; }
[["+", 49, 50, 51, 16, 12, 16, 31, 23, 0, 24], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 12, 16, 31, 23, 0, 25]]
1
44
#include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; if (l % d == 0) { cout << r / d - l / d + 1 << endl; } else { cout << r / d - l / d + 1 << endl; } }
#include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; if (l % d == 0) { cout << r / d - l / d + 1 << endl; } else { cout << r / d - l / d << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
68
l, r, d = map(int, input().split()) cnt = 0 for i in range(1, r - l + 2): if i % d == 0: cnt += 1 print(cnt)
l, r, d = map(int, input().split()) cnt = 0 for i in range(l, r + 1): if i % d == 0: cnt += 1 print(cnt)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 12, 652, 3, 4, 0, 657, 31, 657, 17, 33], ["-", 12, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
49
l, r, d = gets.chomp.split.map(&:to_i) puts(r / d - l / d)
l, r, d = gets.chomp.split.map(&:to_i) puts(r / d - (l-1) / d)
[["+", 3, 4, 0, 738, 12, 738, 31, 739, 0, 24], ["+", 0, 738, 12, 738, 31, 739, 0, 738, 17, 33], ["+", 0, 738, 12, 738, 31, 739, 0, 738, 12, 612], ["+", 3, 4, 0, 738, 12, 738, 31, 739, 0, 25]]
4
27
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define ll long long #define int long long #define inf ((ll)1e18) #define double long double #define ull unsigned long long #define mod 1000000007 #define vi vector<ll> #define ppi pair<int, int> #define pii pair<pair<int, int>, int> #defi...
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define ll long long #define int long long #define inf ((ll)1e18) #define double long double #define ull unsigned long long #define mod 1000000007 #define vi vector<ll> #define ppi pair<int, int> #define pii pair<pair<int, int>, int> #defi...
[["+", 64, 9, 0, 1, 0, 16, 12, 16, 17, 72], ["+", 64, 9, 0, 1, 0, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38]]
1
215
def main(): import sys def input(): return sys.stdin.readline().rstrip() l, r , d = map(int, input().split()) ans = (r-l)//d if l%d == 0: ans += 1 print(ans) if __name__ == '__main__': main()
def main(): import sys def input(): return sys.stdin.readline().rstrip() l, r , d = map(int, input().split()) ans = r//d - l//d if l%d == 0: ans += 1 print(ans) if __name__ == '__main__': main()
[["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 12, 22], ["-", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
75
import math L,R,d = map(int,input().split()) l_d = math.floor(L/d) r_d = math.floor((R-1)/d) ans = r_d - l_d print(ans)
import math L,R,d = map(int,input().split()) l_d = math.floor((L-1)/d) r_d = math.floor((R)/d) ans = r_d - l_d print(ans)
[["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["-", 3, 4, 0, 657, 31, 23, 0, 657, 17, 33], ["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 612]]
5
53
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; for (int i = l; l <= r; l++) { if (i % d == 0) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int l, r, d; cin >> l >> r >> d; int ans = 0; for (int i = l; i <= r; i++) { if (i % d == 0) ans++; } cout << ans << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22]]
1
89
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> #pragma warn...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <time.h> #include <vector> #pragma warn...
[["+", 3, 4, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 3, 4, 0, 16, 12, 16, 31, 23, 0, 25]]
1
147
/* Author: Ritik Patel */ //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& STL DEBUGGER //&&&&&&&&&&&&&&&&&&&&&&&&&&& // #define _GLIBCXX_DEBUG // Iterator safety; out-of-bounds access for // Containers, etc. #pragma GCC optimize "trapv" // abort() on (signed) integer // overflow. //&&&&&&&&&&&&&&&&&&&&&&&&&&...
/* Author: Ritik Patel */ //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& STL DEBUGGER //&&&&&&&&&&&&&&&&&&&&&&&&&&& // #define _GLIBCXX_DEBUG // Iterator safety; out-of-bounds access for // Containers, etc. #pragma GCC optimize "trapv" // abort() on (signed) integer // overflow. //&&&&&&&&&&&&&&&&&&&&&&&&&&...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
435
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d, count = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (d % i == 0) count++; } cout << count; }
// Implement stak using queue // making push operation costly #include <bits/stdc++.h> using namespace std; int main() { int l, r, d, count = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (i % d == 0) count++; } cout << count; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
62
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int count = 0; for (int i = l; i <= r; i++) { if (i & d == 0) count++; } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; int count = 0; for (int i = l; i <= r; i++) { if (i % d == 0) count++; } cout << count << endl; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 67], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109]]
1
65
/* _ __ _ _____ _____ _____ ___ _ _| |__ ___ / _|_ __ ___ __ _| | __ |___ |___ |___ | / __| | | | '_ \ / _ \ |_| '__/ _ \/ _` | |/ / / / / / / / | (__| |_| | |_) | __/ _| | | __/ (_| | < / / / / / / \___|\__,_|_.__/ \___|_| |_| \___|\__,_|_|\_\ ...
/* _ __ _ _____ _____ _____ ___ _ _| |__ ___ / _|_ __ ___ __ _| | __ |___ |___ |___ | / __| | | | '_ \ / _ \ |_| '__/ _ \/ _` | |/ / / / / / / / | (__| |_| | |_) | __/ _| | | __/ (_| | < / / / / / / \___|\__,_|_.__/ \___|_| |_| \___|\__,_|_|\_\ ...
[["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25]]
1
762
l. r. d = map(int, input().split()) cnt = 0 for i in (l, r+1): if i % d == 0: cnt += 1 print(cnt)
l, r, d = map(int, input().split()) cnt = 0 for i in range(l, r+1): if i % d == 0: cnt += 1 print(cnt)
[["-", 0, 1, 0, 662, 31, 319, 500, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 31, 319, 0, 131], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22]]
5
46
// Don't give up too easy bhai #pragma GCC optimize("-O3") #include <bits/stdc++.h> using namespace std; #define int long long int #define double long double #define inf 1e18 typedef pair<int, int> pii; #define forall(i, a, n) for (int i = a; i < n; i++) #define pb push_back #define fs first #define sec second #def...
// Don't give up too easy bhai #pragma GCC optimize("-O3") #include <bits/stdc++.h> using namespace std; #define int long long int #define double long double #define inf 1e18 typedef pair<int, int> pii; #define forall(i, a, n) for (int i = a; i < n; i++) #define pb push_back #define fs first #define sec second #def...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
173
//#include<bits/stdc++.h> #include <iostream> #define ll long long #define uint unsigned int #define ld long double #define SAM \ ios::sync_with_stdio(0); \ cin.tie(0); ...
//#include<bits/stdc++.h> #include <iostream> #define ll long long #define uint unsigned int #define ld long double #define SAM \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
131
#include <bits/stdc++.h> #define FOR(i, a, b) for (register int i = (a); i < (b); ++i) #define ROF(i, a, b) for (register int i = (a); i >= (b); --i) #define pi pair<int, int> #define mk(a, b) make_pair(a, b) #define fi first #define se second using namespace std; typedef long long ll; typedef double db; const int maxn...
#include <bits/stdc++.h> #define FOR(i, a, b) for (register int i = (a); i < (b); ++i) #define ROF(i, a, b) for (register int i = (a); i >= (b); --i) #define pi pair<int, int> #define mk(a, b) make_pair(a, b) #define fi first #define se second using namespace std; typedef long long ll; typedef double db; const int maxn...
[["+", 3, 4, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 3, 4, 0, 16, 12, 16, 31, 23, 0, 25]]
1
187
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { int L, R, d; int count = 0; cin >> L >> R >> d; for (int i = L; i < R; i++) { if (i % d == 0) { count++; } } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(void) { int L, R, d; int count = 0; cin >> L >> R >> d; for (int i = L; i <= R; i++) { if (i % d == 0) { count++; } } cout << count << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
74
l, r, d = map(int, input().split()) a = 0 for i in range(l, r+1): if i / d == 0: a += 1 print(a)
l, r, d = map(int, input().split()) a = 0 for i in range(l, r+1): if i % d == 0: a += 1 print(a)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 85], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 109]]
5
47
#include <bits/stdc++.h> using namespace std; ///------------input------------// #define fi freopen("in.txt", "r", stdin) #define fo freopen("out.txt", "w", stdout) #define sc1(a) scanf("%lld", &a) #define sc3(a, b, c) scanf("%lld%lld%lld", &a, &b, &c) #define sc2(a, b) scanf("%lld%lld", &a, &b) #define scar(arr, n) ...
#include <bits/stdc++.h> using namespace std; ///------------input------------// #define fi freopen("in.txt", "r", stdin) #define fo freopen("out.txt", "w", stdout) #define sc1(a) scanf("%lld", &a) #define sc3(a, b, c) scanf("%lld%lld%lld", &a, &b, &c) #define sc2(a, b) scanf("%lld%lld", &a, &b) #define scar(arr, n) ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
1,652
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { int l, r, d, ans = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (d % i == 0) { ans++; } } cout << ans; }
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { int l, r, d, ans = 0; cin >> l >> r >> d; for (int i = l; i <= r; i++) { if (i % d == 0) { ans++; } } cout << ans; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
70
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, n, m) for (int i = (int)(n); i <= (int)(m); i++) #define RFOR(i, n, m) for (int i = (int)(n); i >= (int)(m); i--) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define RITR(x, c) for (__typeof(c....
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define FOR(i, n, m) for (int i = (int)(n); i <= (int)(m); i++) #define RFOR(i, n, m) for (int i = (int)(n); i >= (int)(m); i--) #define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++) #define RITR(x, c) for (__typeof(c....
[["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25]]
1
225
#include <bits/stdc++.h> using namespace std; typedef long long int ll; const ll MOD = 1e9 + 7; void solve() { ll l, r, d; cin >> l >> r >> d; ll ans = r / d - l / d; cout << ans << "\n"; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll T = 1; // cin>>T; while (T--) { solve(); ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; const ll MOD = 1e9 + 7; void solve() { ll l, r, d; cin >> l >> r >> d; ll ans = r / d - (l - 1) / d; cout << ans << "\n"; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll T = 1; // cin>>T; while (T--) { solve...
[["+", 49, 50, 51, 16, 12, 16, 31, 23, 0, 24], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 49, 50, 51, 16, 12, 16, 31, 23, 0, 25]]
1
100
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define he...
#include <bits/stdc++.h> #define ll long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pii> #define mi map<int, int> #define mii map<pii, int> #define all(a) (a).begin(), (a).end() #define x first #define y second #define sz(x) (int)x.size() #define endl '\n' #define he...
[["-", 0, 16, 31, 16, 12, 16, 12, 16, 12, 13], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 22]]
1
145