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 <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y; int cntr = 0; for (int i = x; i <= y; i++) { if (i % z == 0) cntr++; } cout << cntr; }
#include <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; int cntr = 0; for (int i = x; i <= y; i++) { if (i % z == 0) cntr++; } cout << cntr; }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
61
#include <algorithm> #include <iostream> #include <utility> #include <vector> using namespace std; int X[200010], Y[200010]; char U[200010]; vector<vector<pair<int, char>>> yoko(200010), tate(200010); vector<vector<pair<int, char>>> waue(400010), wasi(400010); vector<vector<pair<int, char>>> saue(400010), sasi(400010)...
#include <algorithm> #include <iostream> #include <utility> #include <vector> using namespace std; int X[200010], Y[200010]; char U[200010]; vector<vector<pair<int, char>>> yoko(200010), tate(200010); vector<vector<pair<int, char>>> waue(400010), wasi(400010); vector<vector<pair<int, char>>> saue(400010), sasi(400010)...
[["-", 8, 9, 0, 57, 15, 339, 51, 11, 17, 32], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["-", 12, 16, 31, 118, 28, 69, 28, 69, 28, 22], ["+", 12, 16, 31, 118, 28, 69, 28, 69, 28, 22]]
1
1,111
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define INF 1000000000 #define MAX 2000005 using ll = long long; using Graph = vector<vector<int>>; int main() { int N; cin >> N; vector<int> X(N), Y(N); vector<char> U(N); for (int i = 0; i < N; i++) { cin >> X[i] >> Y[i] >> U[i]; } ...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define INF 1000000000 #define MAX 2000005 using ll = long long; using Graph = vector<vector<int>>; int main() { int N; cin >> N; vector<int> X(N), Y(N); vector<char> U(N); for (int i = 0; i < N; i++) { cin >> X[i] >> Y[i] >> U[i]; } ...
[["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["-", 51, 16, 31, 118, 28, 69, 341, 342, 0, 22], ["+", 51, 16, 31, 118, 28, 69, 341, 342, 0, 22]]
1
1,538
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define p_ary(ary, a, b) \ do { \ cout << "["; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define p_ary(ary, a, b) \ do { \ cout << "["; ...
[["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]]
1
893
n = int(input()) n1, n2 = 200001, 400001 s1, s2 = [[] for _ in range(n1)], [[] for _ in range(n1)] s3, s4 = [[] for _ in range(n2)], [[] for _ in range(n2)] for _ in range(n): x, y, u = input().split() x, y = int(x), int(y) a, b = x + y, x - y + 200000 s1[x].append([y, u]) s2[y].append([x, u]) s...
n = int(input()) n1, n2 = 200001, 400001 s1, s2 = [[] for _ in range(n1)], [[] for _ in range(n1)] s3, s4 = [[] for _ in range(n2)], [[] for _ in range(n2)] for _ in range(n): x, y, u = input().split() x, y = int(x), int(y) a, b = x + y, x - y + 200000 s1[x].append([y, u]) s2[y].append([x, u]) s...
[["-", 3, 4, 0, 657, 12, 23, 0, 657, 31, 22], ["-", 3, 4, 0, 657, 12, 23, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 12, 22]]
5
692
/// kazuki08 /* #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds...
/// kazuki08 /* #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds...
[["-", 63, 118, 28, 69, 341, 342, 0, 16, 17, 72], ["+", 63, 118, 28, 69, 341, 342, 0, 16, 17, 33]]
1
1,442
n = int(input()) ans = 10 ** 9 upanddown = [[] for i in range(200001)] leftandright = [[] for i in range(200001)] lis = [] for i in range(n): x,y,r = map(str,input().split()) x,y = int(x),int(y) lis.append([x+y,x-y,x,y,r]) if r == "U": upanddown[x].append([y,0]) elif r == "D": upandd...
n = int(input()) ans = 10 ** 10 upanddown = [[] for i in range(200001)] leftandright = [[] for i in range(200001)] lis = [] for i in range(n): x,y,r = map(str,input().split()) x,y = int(x),int(y) lis.append([x+y,x-y,x,y,r]) if r == "U": upanddown[x].append([y,0]) elif r == "D": upand...
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 0, 57, 15, 679, 12, 23, 0, 679, 17, 354], ["+", 0, 57, 15, 679, 12, 23, 0, 679, 17, 355], ["-", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612]]
5
652
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <random> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_upd...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <random> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_upd...
[["-", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 338, 8, 9, 0, 338, 12, 22], ["+", 8, 9, 0, 338, 8, 9, 0, 338, 12, 22], ["-", 49, 50, 51, 66, 28, 2, 63, 118, 28, 22], ["+", 49, 50, 51, 66, 28, 2, 63, 118, 28, 22]]
1
1,344
//#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; // vector string deque break continue #define forn(i, s, f) for (int i = (int)s; i < (int)f; i++) #define ll long long #define ull unsigned long long #define ld long double #define pii pair<int, int> #define fs first #define sc second #defi...
//#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; // vector string deque break continue #define forn(i, s, f) for (int i = (int)s; i < (int)f; i++) #define ll long long #define ull unsigned long long #define ld long double #define pii pair<int, int> #define fs first #define sc second #defi...
[["-", 8, 9, 0, 338, 8, 9, 0, 338, 12, 22], ["+", 8, 9, 0, 338, 8, 9, 0, 338, 12, 22]]
1
1,231
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> using vec = vector<T>; template <class T> using vvec = vector<vec<T>>; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; map<int, map<char, set<int>>> mx, my, mp, mm; vec<int> X(N), Y(N); vec<char>...
#include <bits/stdc++.h> using namespace std; using ll = long long; template <class T> using vec = vector<T>; template <class T> using vvec = vector<vec<T>>; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; map<int, map<char, set<int>>> mx, my, mp, mm; vec<int> X(N), Y(N); vec<char>...
[["-", 28, 69, 28, 69, 341, 342, 0, 69, 28, 22], ["+", 28, 69, 28, 69, 341, 342, 0, 69, 28, 22], ["-", 63, 118, 28, 69, 341, 342, 0, 103, 0, 125], ["+", 63, 118, 28, 69, 341, 342, 0, 103, 0, 125], ["-", 12, 2, 63, 118, 28, 69, 28, 69, 28, 22], ["+", 12, 2, 63, 118, 28, 69, 28, 69, 28, 22]]
1
926
#pragma region header #include <bits/stdc++.h> #define int long long #define all(a) begin(a), end(a) #define rall(a) rbegin(a), rend(a) #define mp make_pair #define mt make_tuple #define rep1(i, n) for (decltype(+n) i = 0; i < (n); i++) #define rrep1(i, n) for (auto i = n - 1; i > static_cast<decltype(i)>(-1); i--) #de...
#pragma region header #include <bits/stdc++.h> #define int long long #define all(a) begin(a), end(a) #define rall(a) rbegin(a), rend(a) #define mp make_pair #define mt make_tuple #define rep1(i, n) for (decltype(+n) i = 0; i < (n); i++) #define rrep1(i, n) for (auto i = n - 1; i > static_cast<decltype(i)>(-1); i--) #de...
[["-", 64, 1, 0, 2, 63, 118, 28, 69, 28, 22], ["+", 64, 1, 0, 2, 63, 118, 28, 69, 28, 22]]
1
1,626
#include <bits/stdc++.h> using namespace std; using lint = long long int; using P = pair<int, int>; using PL = pair<lint, lint>; #define FOR(i, begin, end) \ for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define IFOR(i, begin, end) ...
#include <bits/stdc++.h> using namespace std; using lint = long long int; using P = pair<int, int>; using PL = pair<lint, lint>; #define FOR(i, begin, end) \ for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define IFOR(i, begin, end) ...
[["-", 0, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["+", 0, 2, 63, 118, 28, 69, 341, 342, 0, 22]]
1
898
#include <bits/stdc++.h> using namespace std; using ll = int64_t; // using ll = long long; using ull = uint64_t; using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; using f64 = double; using pii = pair<int, int>; using pll = pair<ll, ll>; using ld = double; #define X first #define Y...
#include <bits/stdc++.h> using namespace std; using ll = int64_t; // using ll = long long; using ull = uint64_t; using i32 = int32_t; using u32 = uint32_t; using i64 = int64_t; using u64 = uint64_t; using f64 = double; using pii = pair<int, int>; using pll = pair<ll, ll>; using ld = double; #define X first #define Y...
[["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13]]
1
2,472
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <map> #include <memory> #include <numeric> #includ...
#define _CRT_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <map> #include <memory> #include <numeric> #includ...
[["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 13], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 13]]
1
2,647
/*{{{*/ #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define SZ(X) ((int)(X).size()) #defin...
/*{{{*/ #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define SZ(X) ((int)(X).size()) #defin...
[["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
1,485
#pragma region kyopro_template #define Nyaan_template #include <bits/stdc++.h> #define pb push_back #define eb emplace_back #define fi first #define se second #define each(x, v) for (auto &x : v) #define all(v) (v).begin(), (v).end() #define sz(v) ((int)(v).size()) #define mem(a, val) memset(a, val, sizeof(a)) #define ...
#pragma region kyopro_template #define Nyaan_template #include <bits/stdc++.h> #define pb push_back #define eb emplace_back #define fi first #define se second #define each(x, v) for (auto &x : v) #define all(v) (v).begin(), (v).end() #define sz(v) ((int)(v).size()) #define mem(a, val) memset(a, val, sizeof(a)) #define ...
[["-", 64, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
2,508
def main(): l, r, d = map(int, input().split()) res = r // d - l // d print(res) if __name__ == '__main__': main()
def main(): l, r, d = map(int, input().split()) res = r // d - (l-1) // d print(res) if __name__ == '__main__': main()
[["+", 0, 662, 12, 657, 12, 657, 31, 23, 0, 24], ["+", 12, 657, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 12, 657, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 662, 12, 657, 12, 657, 31, 23, 0, 25]]
5
46
L, R, D = map(int, input().split()) def calc(n): return (n-1) // D + 1 print(calc(R) - calc(L-1))
L, R, D = map(int, input().split()) def calc(n): return n // D print(calc(R) - calc(L-1))
[["-", 0, 37, 0, 657, 31, 657, 31, 23, 0, 24], ["-", 0, 657, 31, 657, 31, 23, 0, 657, 17, 33], ["-", 0, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 37, 0, 657, 31, 657, 31, 23, 0, 25], ["-", 0, 14, 8, 196, 0, 37, 0, 657, 17, 72], ["-", 0, 14, 8, 196, 0, 37, 0, 657, 12, 612]]
5
48
#include <bits/stdc++.h> using namespace std; #include <iomanip> #include <math.h> template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 10010...
#include <bits/stdc++.h> using namespace std; #include <iomanip> #include <math.h> template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 10010...
[["-", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["-", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33]]
1
238
L, R, d = list(map(int, input().split(" "))) diff=R//d - (L-1)//d if d==1: diff=diff+1 print(diff)
L, R, d = list(map(int, input().split(" "))) diff=R//d - (L-1)//d if d==1: diff=diff print(diff)
[["-", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["-", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
51
// J'aime // Chemise Blanche #include <bits/stdc++.h> using namespace std; #define int long long #define ii pair<int, int> #define fi first #define sc second #define all(x) (x).begin(), (x).end() #define dbg(x) cerr << __LINE__ << " > " << #x << " = " << (x) << endl void MAIN() { int l, r, d; cin >> l >> r >> ...
// J'aime // Chemise Blanche #include <bits/stdc++.h> using namespace std; #define int long long #define ii pair<int, int> #define fi first #define sc second #define all(x) (x).begin(), (x).end() #define dbg(x) cerr << __LINE__ << " > " << #x << " = " << (x) << endl void MAIN() { int l, r, d; cin >> l >> r >> ...
[["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["-", 0, 11, 12, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]]
1
131
a, b, c = map(int, input().split()) ans = 0 for i in range(a, b + 1): if a % c == 0: ans += 1 print(ans)
a, b, c = map(int, input().split()) ans = 0 for i in range(a, b + 1): if i % c == 0: ans += 1 print(ans)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22]]
5
47
#include <stdio.h> int main(void) { int l; int r; int d; scanf("%d", &l); scanf("%d", &r); scanf("%d", &d); int ans = 0; for (int x = l; x <= r; x++) { if (x % 2 == 1) ans++; } printf("%d", ans); return 0; }
#include <stdio.h> int main(void) { int l; int r; int d; scanf("%d", &l); scanf("%d", &r); scanf("%d", &d); int ans = 0; for (int x = l; x <= r; x++) { if (x % d == 0) ans++; else ; } printf("%d", ans); return 0; }
[["-", 0, 57, 15, 23, 0, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 57, 64, 1, 0, 35], ["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]]
0
92
#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) i++; } 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, 64, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22]]
1
65
L, R, D = map(int, input().split()) cnt = 0 for i in range(L, R+1): 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, 8, 196, 0, 57, 0, 121], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102]]
5
45
L, R, d = map(int, input().split()) print((R - L + 1) // d)
L, R, d = map(int, input().split()) print(R//d - (L-1)//d)
[["-", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 17, 676], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 24], ["-", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 17, 33]]
5
30
def main(): L, R, d = map(int, input().split()) num_R = R // d num_L = L // d ans = num_R - num_L print(ans) if __name__ == "__main__": main()
def main(): L, R, d = map(int, input().split()) num_R = R // d num_L = (L-1) // d ans = num_R - num_L print(ans) if __name__ == "__main__": main()
[["+", 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
52
l,r,d = map(int, input().split()) print(r//d-l//d)
l,r,d = map(int, 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
28
package main import "fmt" func main() { var l,r,d int fmt.Scan(&l,&r,&d) var c int for { if l > r { break } else if (l / d) == 0 { c++ } l++ } fmt.Println(c) }
package main import "fmt" func main() { var l,r,d int fmt.Scan(&l,&r,&d) var c int for { if l > r { break } else if (l % d) == 0 { c++ } l++ } fmt.Println(c) }
[["-", 75, 57, 15, 16, 31, 23, 0, 16, 17, 85], ["+", 75, 57, 15, 16, 31, 23, 0, 16, 17, 109]]
7
78
package main import "fmt" func main() { var l,r,d int fmt.Scan(&l,&r,&d) answer := (r-l+1) / d if (l==r && r==d) { fmt.Println(1) } else { fmt.Println(answer) } }
package main import "fmt" func main() { var l,r,d int fmt.Scan(&l,&r,&d) answer := (r/d - (l-1) / d) if (l==r && r==d) { fmt.Println(1) } else { fmt.Println(answer) } }
[["+", 12, 432, 0, 23, 0, 16, 31, 16, 17, 85], ["+", 12, 432, 0, 23, 0, 16, 31, 16, 12, 22], ["+", 0, 23, 0, 16, 12, 16, 31, 23, 0, 24], ["-", 12, 432, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 8, 196, 0, 431, 12, 432, 0, 23, 0, 25]]
7
79
l, r, d = input().split() print(r//d -(l-1)//d)
l, r, d = map(int, input().split()) print(r//d - (l-1)//d)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
27
#include <bits/stdc++.h> #define ALL(A) (A).begin(), (A).end() #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a ...
#include <bits/stdc++.h> #define ALL(A) (A).begin(), (A).end() #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a ...
[["-", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["+", 31, 16, 12, 16, 31, 16, 31, 23, 0, 22], ["-", 12, 16, 31, 23, 0, 16, 31, 16, 31, 22], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["-", 12, 16, 12, 16, 31, 23, 0, 16, 17, 72...
1
249
#include <bits/stdc++.h> #define ALL(A) (A).begin(), (A).end() #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a ...
#include <bits/stdc++.h> #define ALL(A) (A).begin(), (A).end() #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a ...
[["-", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["-", 12, 16, 31, 23, 0, 16, 31, 16, 31, 22], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 31, 22]]
1
249
L,R,d = (int(x) for x in input().split()) cnt=0 for i in range(L,R): if i%d==0: cnt+=1 print(cnt)
L,R,d = (int(x) for x in input().split()) cnt=0 for i in range(L,R+1): if i%d==0: cnt+=1 print(cnt)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
49
#include <bits/stdc++.h> //#include <boost/algorithm/string.hpp> //#include <string> using namespace std; #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> #define vii vector<pair<int, int>> #define vi vector<int> #define pb(x) push_back(x) #define pbm(x, y) push_back({x, y}) #define ff first #de...
#include <bits/stdc++.h> //#include <boost/algorithm/string.hpp> //#include <string> using namespace std; #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> #define vii vector<pair<int, int>> #define vi vector<int> #define pb(x) push_back(x) #define pbm(x, y) push_back({x, y}) #define ff first #de...
[["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 12, 22], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 25]]
1
152
l, r, d = map(int,input().split()) count = 0 for i in range(l,r): 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, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102]]
5
43
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans = b / c; ans -= a / c; cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans = b / c; ans -= (a - 1) / c; cout << ans << endl; return 0; }
[["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]]
1
49
#include <bits/stdc++.h> using namespace std; #define FOR(i, start, end) for (uint64_t i = start; i < end; i++) #define REP(i, n) FOR(i, 0, n) // 最大公約数gcd // 最小公倍数lcm=m*n/gcd uint64_t gcd(uint64_t m, uint64_t n) { uint64_t temp; while (m % n != 0) { temp = n; n = m % n; m = temp; } return n; } ui...
#include <bits/stdc++.h> using namespace std; #define FOR(i, start, end) for (uint64_t i = start; i < end; i++) #define REP(i, n) FOR(i, 0, n) // 最大公約数gcd // 最小公倍数lcm=m*n/gcd uint64_t gcd(uint64_t m, uint64_t n) { uint64_t temp; while (m % n != 0) { temp = n; n = m % n; m = temp; } return n; } ui...
[["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, ...
1
539
#include <iostream> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; if (L / d == 1) { cout << R / d - L / d + 1; } else { cout << R / d - L / d; } }
#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; } else { cout << R / d - L / d; } }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
62
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long #define fi first #define se second #define pb push_back #define me memse...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <vector> #define ll long long #define fi first #define se second #define pb push_back #define me memse...
[["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 25], ["-", 0, 16, 31, 16, 12, 16, 12, 23, 0, 25]]
1
139
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; #define ll long long #define pal pair<ll, ll> #define pad pair...
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdlib> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using namespace std; #define ll long long #define pal pair<ll, ll> #define pad pair...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22]]
1
266
#include <iostream> using namespace std; void test_case() { int l, r, d, cnt = 0; ; cin >> l >> r >> d; for (int i = l; i <= r; ++i) { if (d % i == 0) { cnt++; } } cout << cnt << "\n"; } int main() { int tc = 1; // cin>>tc; while (tc--) { test_case(); } return 0; }
#include <iostream> using namespace std; void test_case() { int l, r, d, cnt = 0; ; cin >> l >> r >> d; for (int i = l; i <= r; ++i) { if (i % d == 0) { cnt++; } } cout << cnt << "\n"; } int main() { int tc = 1; // cin>>tc; while (tc--) { test_case(); } return 0; }
[["-", 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
95
a,b,c=map(int,input().split()) print(a//c-(b-1)//c)
a,b,c=map(int,input().split()) print(b//c-(a-1)//c)
[["-", 0, 652, 3, 4, 0, 657, 31, 657, 31, 22], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 31, 22], ["-", 0, 657, 12, 657, 31, 23, 0, 657, 31, 22], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 31, 22]]
5
32
#include <stdio.h> main() { int l, r, d; scanf("%d%d%d", &l, &r, &d), printf("%d\n", (r - l + 1) / d); return 0; }
#include <stdio.h> main() { int l, r, d; scanf("%d%d%d", &l, &r, &d), printf("%d\n", r / d - (l - 1) / d); return 0; }
[["-", 12, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 85], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 22], ["+", 3, 4, 0, 16, 12, 16, 31, 23, 0, 24], ["-", 3, 4, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 33]]
1
51
l,r,d = gets.split.map(&:to_i) puts (r / d) - (l / d)
l,r,d = gets.split.map(&:to_i) puts (r / d) - ((l - 1) / d)
[["+", 0, 738, 12, 739, 0, 738, 31, 739, 0, 24], ["+", 12, 739, 0, 738, 31, 739, 0, 738, 17, 33], ["+", 12, 739, 0, 738, 31, 739, 0, 738, 12, 612], ["+", 0, 738, 12, 739, 0, 738, 31, 739, 0, 25]]
4
27
#include <iostream> using namespace std; int main(void) { int a, b, c; cin >> a; cin >> b; cin >> c; a = b / c - a / c; cout << a; }
#include <iostream> using namespace std; int main(void) { int a, b, c; cin >> a; cin >> b; cin >> c; a = b / c - (a - 1) / c; cout << a; }
[["+", 0, 11, 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], ["+", 0, 11, 12, 16, 12, 16, 31, 23, 0, 25]]
1
46
#include <bits/stdc++.h> #include <cmath> using namespace std; #define coutv(v) \ for (int i = 0; i < (v).size(); ++i) \ cout << v[i] << ' '; \ cout << en...
#include <bits/stdc++.h> #include <cmath> using namespace std; #define coutv(v) \ for (int i = 0; i < (v).size(); ++i) \ cout << v[i] << ' '; \ cout << en...
[["-", 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
105
#include <bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int, int> P; int n, l, r, d, a[MAXN]; int main() { scanf("%d%d%d", &l, &r, &d); printf("%d\n", r / d - l / d); }
#include <bits/stdc++.h> #define MAXN 100005 #define INF 1000000000 #define MOD 1000000007 #define F first #define S second using namespace std; typedef long long ll; typedef pair<int, int> P; int n, l, r, d, a[MAXN]; int main() { scanf("%d%d%d", &l, &r, &d); printf("%d\n", r / d - (l - 1) / d); }
[["+", 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
87
#include <bits/stdc++.h> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; cout << r / d - l / d << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int l, r, 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
42
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int l, r, d; cin >> l >> r >> d; int cnt = 0; for (int i = l; i <= r; i++) { if (i % d == 0) { cnt++; i += d; } } cout << cnt << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int l, r, d; cin >> l >> r >> d; int cnt = 0; for (int i = l; i <= r; i++) { if (i % d == 0) { cnt++; // i += d; } } cout << cnt << '\n'; return 0; }
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]]
1
90
#include <iostream> using namespace std; int main() { int ans = 0; int l, r, d; cin >> l >> r >> d; for (int i = l; i <= r; ++i) { if (i % 2 == 0) ++ans; } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { int ans = 0; int l, r, d; cin >> l >> r >> d; 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, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
68
/*************************************************\ In the name of almighty ALLAH MD.Faysal Hasan Comilla Univesity \*************************************************/ #include <bits/stdc++.h> using namespace std; #define ikarus_101 ...
/*************************************************\ In the name of almighty ALLAH MD.Faysal Hasan Comilla Univesity \*************************************************/ #include <bits/stdc++.h> using namespace std; #define ikarus_101 ...
[["-", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 17, 85], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 12, 22], ["+", 12, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]]
1
376
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define ld long double template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; ...
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define ld long double template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; ...
[["-", 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
408
#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; rep(i, (r - l + 1)) if ((r + 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; rep(i, (r - l + 1)) if ((l + i) % d == 0) ans++; cout << ans << endl; }
[["-", 51, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 31, 22]]
1
90
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define mod 1000000007 #define qmod 998244353 #define M 10000001 #define endl "\n" #define all(a) (a).begin(), (a).end() #define rep(i, a, b) for (int i = a; i < b; ++i) #define repr(i, a, b) for ...
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) #define mod 1000000007 #define qmod 998244353 #define M 10000001 #define endl "\n" #define all(a) (a).begin(), (a).end() #define rep(i, a, b) for (int i = a; i < b; ++i) #define repr(i, a, b) for ...
[["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 85], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["-", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33]]
1
157
#include <bits/stdc++.h> #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define all(a) a.begin(), a.end() using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } ...
#include <bits/stdc++.h> #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) #define all(a) a.begin(), a.end() using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } ...
[["-", 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
244
#include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; if (d == 1) cout << r - l + 1 << "\n"; else if (l == d && d == r && l == r) cout << "1" << "\n"; else cout << (r / d) - (l / d) << "\n"; return 0; }
#include <iostream> using namespace std; int main() { int l, r, d; cin >> l >> r >> d; if (d == 1) cout << r - l + 1 << "\n"; else if (l == d && d == r && l == r) cout << "1" << "\n"; else cout << (r / d) - ((l - 1) / d) << "\n"; return 0; }
[["+", 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
92
L.R,d = map(int,input().split()) ans = 0 for i in range(L,R+1): if i % d == 0: ans += 1 print(ans)
L,R,d = map(int,input().split()) ans = 0 for i in range(L,R+1): if i % d == 0: ans += 1 print(ans)
[["-", 0, 1, 0, 662, 31, 684, 0, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21]]
5
47
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #define ll long long #define pb push_back #define clr(a, b) memset((a), (b), sizeof(a)...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #define ll long long #define pb push_back #define clr(a, b) memset((a), (b), sizeof(a)...
[["-", 31, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 13], ["-", 31, 16, 12, 16, 31, 16, 31, 23, 0, 25], ["-", 12, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33]]
1
179
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fr(i, n, x) for (int i = 0; i < n; i += x) #define pb push_back int main() { int l, r, d; cin >> l >> r >> d; int a = ceil((l * 1.0) / 2); int b = (r / 2); cout << b - a + 1; }
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fr(i, n, x) for (int i = 0; i < n; i += x) #define pb push_back int main() { int l, r, d; cin >> l >> r >> d; int a = ceil((l * 1.0) / d); int b = (r / d); cout << b - a + 1; }
[["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 22], ["-", 0, 43, 49, 50, 51, 23, 0, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 23, 0, 16, 12, 22]]
1
74
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<string> vs; typedef pair<int, int> pii; #define sz(a) int((a).size()) #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define fi first #define se ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<string> vs; typedef pair<int, int> pii; #define sz(a) int((a).size()) #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define fi first #define se ...
[["-", 8, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 8, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 8, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
598
// A - Number of Multiples // Hiia #include <stdio.h> #include <stdlib.h> //rannsuu, zettaichi(absolute) #include <time.h> // srand((unsigned int) time(0)); #include <math.h> //koudona keisann #include <string.h> //hairetsu #define max(p, q) ((p) > (q) ? (p) : (q)) #define min(p, q) ((p) < (q) ? (p) : (q)) typedef lo...
// A - Number of Multiples // Hiia #include <stdio.h> #include <stdlib.h> //rannsuu, zettaichi(absolute) #include <time.h> // srand((unsigned int) time(0)); #include <math.h> //koudona keisann #include <string.h> //hairetsu #define max(p, q) ((p) > (q) ? (p) : (q)) #define min(p, q) ((p) < (q) ? (p) : (q)) typedef lo...
[["+", 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]]
0
459
#include <algorithm> #include <cstring> #include <iostream> #include <map> #include <vector> using namespace std; void solve() {} int main() { int l, r, n; cin >> l >> r >> n; cout << r / n - l / n << "\n"; return 0; }
#include <algorithm> #include <cstring> #include <iostream> #include <map> #include <vector> using namespace std; void solve() {} int main() { int l, r, n; cin >> l >> r >> n; cout << r / n - (l - 1) / n << "\n"; 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
58
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int answer; answer = R / d - L / d; if (R % d == 0) answer++; cout << answer << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; int answer; answer = R / d - L / d; if (L % d == 0) answer++; cout << answer << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]]
1
57
l,r,n = map(int,input()) count = 0 for i in range(l,r+1): if i % n == 0: count += 1 print(count)
l,r,n = map(int,input().split()) count = 0 for i in range(l,r+1): if i % n == 0: count += 1 print(count)
[["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
43
import sys sys.setrecursionlimit(10 ** 7) read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines L, R, D = map(int, input().split()) ans = 0 for x in range(L, R + 1): if x // D == 0: ans += 1 print(ans)
import sys sys.setrecursionlimit(10 ** 7) read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines L, R, D = map(int, input().split()) ans = 0 for x in range(L, R + 1): if (x % D) == 0: ans += 1 print(ans)
[["+", 8, 196, 0, 57, 15, 666, 0, 23, 0, 24], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 0, 57, 15, 666, 0, 23, 0, 657, 17, 109], ["+", 8, 196, 0, 57, 15, 666, 0, 23, 0, 25]]
5
84
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <ti...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <iterator> #include <limits> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <ti...
[["+", 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
355
# -*- coding: utf-8 -*- import bisect import heapq import math import random from collections import Counter, defaultdict, deque from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacement, product, permutations from...
# -*- coding: utf-8 -*- import bisect import heapq import math import random from collections import Counter, defaultdict, deque from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal from functools import lru_cache, reduce from itertools import combinations, combinations_with_replacement, product, permutations from...
[["+", 0, 37, 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], ["+", 0, 37, 0, 657, 12, 657, 31, 23, 0, 25]]
5
299
l, r, d = map(int, input().split()) num = 0 for i in range(r - l + 1): if (i + r)/ d == int((i + r) / d): num += 1 print(num)
l, r, d = map(int, input().split()) num = 0 for i in range(r - l +1): if (i + l) / d == int((i + l) / d): num += 1 print(num)
[["-", 15, 666, 0, 657, 31, 23, 0, 657, 12, 22], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 12, 22], ["-", 3, 4, 0, 657, 31, 23, 0, 657, 12, 22], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 12, 22]]
5
60
L, R, d = map(int, input().split()) ans = (R - L + 1) // d print(ans)
L, R, d = map(int, input().split()) ans = R // d - (L - 1) // d print(ans)
[["-", 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, 662, 12, 657, 12, 657, 31, 23, 0, 24], ["-", 0, 662, 12, 657, 31, 23, 0, 657, 17, 72], ["+", 12, 657, 12, 657, 31, 23, 0, 657, 17, 33]]
5
33
input = input() print(input) L, R, d = [int(n) for n in input.split()] count = 0 for n in range(L, R+1): if n % d == 0: count += 1 print(count)
input = input() L, R, d = [int(n) for n in input.split()] count = 0 for n in range(L, R+1): if n % d == 0: count += 1 print(count)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
58
L, R, d = input().split() L = int(L) R = int(R) d = int(d) cnt = 0 for t in Range(L,R+1): if t % d == 0: cnt = cnt + 1 print(cnt)
L, R, d = input().split() L = int(L) R = int(R) d = int(d) cnt = 0 for t in range(L,R+1): if t % d == 0: cnt = cnt + 1 print(cnt)
[["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22]]
5
62
#include <iostream> using namespace std; int main() { long long l, r, d; cin >> l >> r >> d; long long res = (l / d) + (r / d); if (l % d == 0) res = res + 1; cout << res; }
#include <iostream> using namespace std; int main() { long long l, r, d; cin >> l >> r >> d; long long res = (r / d) - (l / d); if (l % d == 0) res = res + 1; cout << res; }
[["-", 49, 50, 51, 16, 31, 23, 0, 16, 31, 22], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 31, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 31, 22], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 31, 22]]
1
62
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double ll power(ll x, ll y, ll p) { ll res = 1; // Initialize result x = x % p; // Update x if it is more than or // equal to p if (x == 0) return 0; // In case x is divisible by p; while (y > 0) { // If ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double ll power(ll x, ll y, ll p) { ll res = 1; // Initialize result x = x % p; // Update x if it is more than or // equal to p if (x == 0) return 0; // In case x is divisible by p; while (y > 0) { // If ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]]
1
157
l, r, d = map(int,input().split()) ans = 0 for i in range(l, r+1): if i % d == 0: ans += 1
l, r, d = map(int,input().split()) ans = 0 for i in range(l, r+1): if i % d == 0: ans += 1 print(ans)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
43
L, R, d = map(int, input().split()) cnt = 0 for i in range(L, R+1, 1): if i % d == 0: cnt += 1 print(i) print(cnt)
L, R, d = map(int, input().split()) cnt = 0 for i in range(L, R+1, 1): if i % d == 0: cnt += 1 print(cnt)
[["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]]
5
53
// header {{{ #include <bits/stdc++.h> using namespace std; void solve() { int s, e, a; cin >> s; cin >> e; cin >> a; int res = 0; if (a == 1) res = e - s + 1; else res = e / a - s / a + (s == a ? 1 : 0); cout << res << "\n" << endl; // cout << ans << "\n"; } signed main() { solve(); r...
// header {{{ #include <bits/stdc++.h> using namespace std; void solve() { int s, e, a; cin >> s; cin >> e; cin >> a; int res = 0; if (a == 1) res = e - s + 1; else res = e / a - s / a + (s % a == 0 ? 1 : 0); cout << res << "\n" << endl; // cout << ans << "\n"; } signed main() { solve(); ...
[["-", 12, 16, 12, 23, 0, 41, 15, 16, 17, 60], ["+", 12, 23, 0, 41, 15, 16, 31, 16, 17, 109], ["+", 12, 16, 12, 23, 0, 41, 15, 16, 17, 60], ["+", 12, 16, 12, 23, 0, 41, 15, 16, 12, 13]]
1
96
num = list(map(int, input().split())) min_range = num[0] max_range = num[1] n = num[2] len([i for i in range(min_range, max_range+1) if i % n <= 0])
num = list(map(int, input().split())) min_range = num[0] max_range = num[1] n = num[2] ans = len([i for i in range(min_range, max_range+1) if i % n <= 0]) print(ans)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
58
import java.util.Scanner; // A - Number of Multiples 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 X = (R / d - L / d); if (L == d) { X++; } System.out.println(X);...
import java.util.Scanner; // A - Number of Multiples 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 X = (R / d - L / d); if (L % d == 0) { X++; } System.out.println...
[["-", 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
97
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d, answer; cin >> L; cin >> R; cin >> d; answer = 0; for (int L; L <= R; L++) { if (L % d == 0) { answer++; } } cout << answer << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d, answer; cin >> L; cin >> R; cin >> d; answer = 0; for (cin >> L; L <= R; L++) { if (L % d == 0) { answer++; } } cout << answer << endl; }
[["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 10, 16, 17, 152]]
1
70
a, b, c = map(int, input().split()) count = 0 for i in range(1, b+1): if i % c == 0: count = count +1 print(count)
a, b, c = map(int, input().split()) count = 0 for i in range(a, b+1): if i % c == 0: count = count + 1 print(count)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
5
49
#include <stdio.h> int main() { int d, l, r, i, count = 0; scanf("%d %d %d", &l, &r, &d); for (i = l + 1; i <= r; i++) { if (i % d == 0) count++; else continue; } printf("%d\n", count); return 0; }
#include <stdio.h> int main() { int d, l, r, i, count = 0; scanf("%d %d %d", &l, &r, &d); for (i = l; i <= r; i++) { if (i % d == 0) count++; else continue; } printf("%d\n", count); return 0; }
[["-", 8, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 12, 13]]
0
81
l,r,d=map(int,input().split()) a=l-1//d b=r//d print(b-a)
l,r,d=map(int,input().split()) a=(l-1)//d b=r//d print(b-a)
[["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25]]
5
36
#!/usr/bin/env python3 #%% for atcoder uniittest use import sys input= lambda: sys.stdin.readline().rstrip() def pin(type=int):return map(type,input().split()) def tupin(t=int):return tuple(pin(t)) def lispin(t=int):return list(pin(t)) #%%code def resolve(): L,R,d=pin() cnt=0 for i in range(L,R+1): ...
#!/usr/bin/env python3 #%% for atcoder uniittest use import sys input= lambda: sys.stdin.readline().rstrip() def pin(type=int):return map(type,input().split()) def tupin(t=int):return tuple(pin(t)) def lispin(t=int):return list(pin(t)) #%%code def resolve(): L,R,d=pin() cnt=0 for i in range(L,R+1): ...
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
118
if __name__ == "__main__": l, r, d = map(int, input().split()) ans = r//d - l//d if l==d: ans += 1 print(ans)
if __name__ == "__main__": l, r, d = map(int, input().split()) ans = r//d - l//d if l%d==0: ans += 1 print(ans)
[["-", 0, 57, 64, 196, 0, 57, 15, 666, 667, 60], ["+", 64, 196, 0, 57, 15, 666, 0, 657, 17, 109], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 0, 612]]
5
46
#include <stdio.h> int main(void) { int a, b, c; scanf("%d%d%d", &a, &b, &c); int i, cnt = 0; for (i = a; i <= b; i++) { if (i % i) cnt++; } printf("%d\n", cnt); return 0; }
#include <stdio.h> int main(void) { int a, b, c; scanf("%d%d%d", &a, &b, &c); int i, cnt = 0; for (i = a; i <= b; i++) { if (i % c == 0) cnt++; } printf("%d\n", cnt); return 0; }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 12, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 12, 13]]
0
76
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << b / c - a / c; }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << b / c - (a - 1) / c; }
[["+", 0, 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], ["+", 0, 16, 12, 16, 12, 16, 31, 23, 0, 25]]
1
37
#include <cstdint> #include <iostream> #include <string> int main(int argc, char *argv[]) { int32_t L, R, d; std::cin >> L; std::cin >> R; std::cin >> d; int cnt = 0; for (int i = L; i <= R; ++i) { cnt += (i % d == 0) ? 1 : 0; } std::cout << cnt / d << std::endl; return 0; }
#include <cstdint> #include <iostream> #include <string> int main(int argc, char *argv[]) { int32_t L, R, d; std::cin >> L; std::cin >> R; std::cin >> d; int cnt = 0; for (int i = L; i <= R; ++i) { cnt += (i % d == 0) ? 1 : 0; } std::cout << cnt << std::endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 85], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]]
1
95
L,R,d = [int(x) for x in input().split()] c = 0 for i in range(L,R): if i % d == 0: c += 1 print(c)
L,R,d = [int(x) for x in input().split()] c = 0 for i in range(L,R+1): if i % d == 0: c += 1 print(c)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
49
l, r, d = map(int, input().split()) ans = int(r/d)-int(l-1/d) print(ans)
l, r, d = map(int, input().split()) ans = int(r/d)-int((l-1)/d) print(ans)
[["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25]]
5
39
def main # min = ARGV[0].to_i # max = ARGV[1].to_i # multiple = ARGV[2].to_i min, max, multiple = gets.split(' ') min = min.to_i max = max.to_i multiple = multiple.to_i return puts 0 if multiple == 0 min_multi = (min / multiple) * multiple min_multi = min_multi + multiple max_multi = (max / mu...
def main # min = ARGV[0].to_i # max = ARGV[1].to_i # multiple = ARGV[2].to_i min, max, multiple = gets.split(' ') min = min.to_i max = max.to_i multiple = multiple.to_i return puts 0 if multiple == 0 min_multi = (min / multiple) * multiple min_multi = min_multi + multiple if min_multi < min max...
[["+", 0, 493, 0, 735, 8, 736, 0, 751, 0, 121], ["+", 0, 735, 8, 736, 0, 751, 15, 738, 31, 22], ["+", 0, 735, 8, 736, 0, 751, 15, 738, 17, 18], ["+", 0, 735, 8, 736, 0, 751, 15, 738, 12, 22]]
4
87
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { FastReader reader = new FastReader(); int l = reader.nextInt(); int r = reader.nextInt(); int d = reader.nextInt(...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { FastReader reader = new FastReader(); int l = reader.nextInt(); int r = reader.nextInt(); int d = reader.nextInt(...
[["+", 0, 57, 15, 15, 0, 16, 31, 23, 0, 24], ["+", 15, 15, 0, 16, 31, 23, 0, 16, 31, 22], ["+", 15, 15, 0, 16, 31, 23, 0, 16, 17, 109], ["+", 0, 57, 15, 15, 0, 16, 31, 23, 0, 25], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 12, 499]]
3
290
list = list(map(int,inout().split())) large = list[1] // list[2] small = list[0] // list[2] amari = list[0] % list[2] if amari == 0: print(large - small + 1) else: print(large - small)
list = list(map(int,input().split())) large = list[1] // list[2] small = list[0] // list[2] amari = list[0] % list[2] if amari == 0: print(large - small + 1) else: print(large - small)
[["-", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22], ["+", 3, 4, 0, 652, 63, 319, 500, 652, 63, 22]]
5
71
import math a,b,c=list(map(int, input().split())) kotae1=math.floor(b/c) kotae2=math.floor(a/c) ans=kotae1-kotae2 if(a==c): ans+=1 print(ans)
import math a,b,c=list(map(int, input().split())) kotae1=math.floor(b/c) kotae2=math.floor(a/c) ans=kotae1-kotae2 if(a%c==0): ans+=1 print(ans)
[["-", 0, 656, 0, 57, 15, 23, 0, 666, 667, 60], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 17, 109], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 0, 612]]
5
62
#include <stdio.h> int main() { int a, b, c, i, count = 0; scanf("%d%d%d", &a, &b, &c); for (i = c; i >= c && i <= b; i++) { if (i % a == 0) { count++; } } printf("%d", count); return 0; }
#include <stdio.h> int main() { int a, b, c, i, count = 0; scanf("%d%d%d", &a, &b, &c); for (i = a; i >= a && i <= b; i++) { if (i % c == 0) { count++; } } printf("%d", count); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 22], ["-", 8, 9, 0, 7, 15, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 23, 0, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 12, 22]]
0
81
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int c1 = 0; for (int i = a; i <= b; i++) { if (c % i == 0) c1++; } cout << c1; return 0; }
/*#include<iostream> #include<algorithm> #include<cmath> #include<string> #define ll long long using namespace std; int main(){ int n,h,ans=0; cin>>n; while(n--){ int b; cin>>b; if(b==1){ cout<<"hard"; ...
[["-", 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
66
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; cout << (R - L + 1) / d << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int L, R, d; cin >> L >> R >> d; cout << R / d - (L - 1) / d << endl; }
[["-", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["+", 0, 16, 31, 16, 12, 16, 31, 16, 12, 22], ["+", 31, 16, 12, 16, 12, 16, 31, 23, 0, 24], ["-", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 12, 16, 31, 23, 0, 16, 17, 33]]
1
41
#include <stdio.h> int main() { int l, r, d; int count = 0; scanf("%d %d %d", &l, &r, &d); for (int i = l; i < r; i++) { if (i % d == 0) count++; } printf("%d", count); }
#include <stdio.h> int main() { int l, r, d; int count = 0; scanf("%d %d %d", &l, &r, &d); for (int i = l; i <= r; i++) { if (i % d == 0) count++; } printf("%d", count); }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
0
72
#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 % R == 0) { ans++; } } cout << ans; #ifndef ONLINE_JUDGE system("pause"); #endif return 0; }
#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; #ifndef ONLINE_JUDGE system("pause"); #endif return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
78
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (b % a == 0) cout << c / a - (b - 1) / a; else cout << c / a - b / a; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> b >> c >> a; if (b % a == 0) cout << c / a - (b - 1) / a; else cout << c / a - b / a; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
63