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(void) { int a, b, c; int count = 0; cin >> a >> b >> c; while (a++ <= b) { if (c % a == 0) count++; } cout << count << endl; return 0; }
#include <iostream> using namespace std; int main(void) { int a, b, c; int count = 0; cin >> a >> b >> c; while (a <= b) { if (c % a == 0) count++; a++; } cout << count << endl; return 0; }
[["-", 0, 52, 15, 339, 51, 16, 31, 27, 17, 29], ["+", 8, 9, 0, 57, 64, 1, 0, 27, 17, 29], ["+", 0, 52, 8, 9, 0, 57, 64, 1, 0, 35], ["+", 0, 52, 8, 9, 0, 1, 0, 27, 28, 22]]
1
62
#include <iostream> using namespace std; // ;????????? int main() { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = 0; i < b - a; i++) { if (c % (a + i) == 0) j++; } cout << j << endl; return 0; }
#include <iostream> using namespace std; // ;????????? int main() { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = 0; i <= b - a; i++) { if (c % (a + i) == 0) j++; } cout << j << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
75
#include <iostream> using namespace std; // ;????????? int main() { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = 0; i < b - a; i++) { if (c % (a + i) == 0) j++; } cout << j << endl; return 0; }
#include <iostream> using namespace std; // ;????????? int main() { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = 0; i <= b - a; i++) { // i<b-a?????¨????????¢????????? if (c % (a + i) == 0) //==0??????????????¨????????¢????????? j++; } cout << j << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
75
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define forn(i, n) for (int i = 0; i < n; i++) int main() { int a; int b; int c; cin >> a >> b >> c; int counter = 0; for (int i = a; i < b; i++) { if (c % i == 0) { count...
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define forn(i, n) for (int i = 0; i < n; i++) int main() { int a; int b; int c; cin >> a >> b >> c; int counter = 0; for (int i = a; i <= b; i++) { if (c % i == 0) { coun...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
92
#include "cstdio" int main() { int a, b, c, cnt; scanf("%d %d %d", &a, &b, &c); for (a; a <= b; a++) { if (!c % a) cnt++; } printf("%d\n", cnt); }
#include "cstdio" int main() { int a, b, c, cnt; scanf("%d %d %d", &a, &b, &c); for (a; a <= b; a++) { if (c % a == 0) cnt++; } printf("%d\n", cnt); }
[["-", 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
68
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int a, b, c; int count = 0; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); for (int i = a; i < b; i++) { if (c % i == 0) { count++; } } printf("%d", count); cout << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int a, b, c; int count = 0; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); for (int i = a; i <= b; i++) { if (c % i == 0) { count++; } } printf("%d", count); cout << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
103
#include <cstdio> using namespace std; int main() { int a, b, c; int count = 0; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); for (int i = a; i < b; i++) { if (c % i == 0) { count++; } } printf("%d\n", count); return 0; }
#include <cstdio> using namespace std; int main() { int a, b, c; int count = 0; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); for (int i = a; i <= b; i++) { if (c % i == 0) { count++; } } printf("%d\n", count); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
96
#include <stdio.h> int main(void) { int a, b, c, count = 0; scanf("%d %d %d", &a, &b, &c); for (int i = a; i <= b - a + 1; i++) { if (c % i == 0) { count = count + 1; } } printf("%d\n", count); return 0; }
#include <stdio.h> int main(void) { int a, b, c, count = 0; scanf("%d %d %d", &a, &b, &c); for (int i = a; i <= b; i++) { if (c % i == 0) { count = count + 1; } } printf("%d\n", count); return 0; }
[["-", 0, 7, 15, 16, 12, 16, 31, 16, 17, 33], ["-", 0, 7, 15, 16, 12, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
85
#include <iostream> int main() { int a, b, c, count = 0; std::cin >> a >> b >> c; for (; a < b; a++) if (c % a == 0) count++; std::cout << count << std::endl; }
#include <iostream> int main() { int a, b, c, count = 0; std::cin >> a >> b >> c; for (; a <= b; a++) if (c % a == 0) count++; std::cout << count << std::endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
60
#include <iostream> int main() { int a, b, c, count = 0; std::cin >> a >> b >> c; for (; a < b; a++) if (c % a == 0) count++; std::cout << count << std::endl; }
#include <iostream> int main() { int a, b, c, count = 0; std::cin >> a >> b >> c; for (; a <= b; a++) if (c % a == 0) count++; std::cout << count << std::endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
60
#include <iostream> using namespace std; int main() { int a, b, c; int d; // ?????£????????? int f; int div = 0; //?´???°?????° cin >> a >> b >> c; d = c % a; f = b - a + 1; //??°??????????????° for (int n = 0; n <= f; n++) { if (d == 0) { div++; } a++; d = c % a; } cout << ...
#include <iostream> using namespace std; int main() { int a, b, c; int d; // ?????£????????? int f; int div = 0; //?´???°?????° cin >> a >> b >> c; d = c % a; f = b - a + 1; //??°??????????????° for (int n = 0; n < f; n++) { if (d == 0) { div++; } a++; d = c % a; } cout << d...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
102
#include <iostream> int main() { int a, b, c; int count = 0; std::cin >> a >> b >> c; for (int i = a; i < b; i++) { if (c % i == 0) { count += 1; } } std::cout << count << std::endl; }
#include <iostream> int main() { int a, b, c; int count = 0; std::cin >> a >> b >> c; for (int i = a; i < b + 1; i++) { if (c % i == 0) { count += 1; } } std::cout << count << std::endl; }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
70
#include <iostream> #include <stdio.h> using namespace std; int main() { int a, b, c; int i; cin >> a >> b >> c; for (a; a < b; a++) { if (c % a == 0) { i++; } } printf("%d\n", i); }
#include <iostream> #include <stdio.h> using namespace std; int main() { int a, b, c; int i = 0; cin >> a >> b >> c; for (a; a <= b; a++) { if (c % a == 0) { i++; } } printf("%d\n", i); }
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
68
#include <iostream> using namespace std; int main() { int a, b, c; int t = 0; cin >> a >> b >> c; for (int i = a; i < b; i++) { if (c % i == 0) t = t + 1; } cout << t << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; int t = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) t = t + 1; } cout << t << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
71
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int a, b, c; int count = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (i % c == 0) count += 1; } cout << count << endl; return 0; }
#include <algorithm> #include <cstdio> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int a, b, c; int count = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) count += 1; } cout << count << endl; 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
81
#include <iostream> using namespace std; int main() { int x, y, z, count = 0; cin >> x >> y >> z; for (; x <= y; x++) { if (x % z == 0) { count++; } } cout << count << endl; return 0; }
#include <iostream> using namespace std; int main() { int x, y, z, count = 0; cin >> x >> y >> z; for (; x <= y; x++) { if (z % x == 0) { count++; } } cout << count << endl; 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
65
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int j = 0; for (int i = a; i < b; ++i) { if ((c % i) == 0) { ++j; } } cout << j << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int j = 0; for (int i = a; i <= b; ++i) { if ((c % i) == 0) { ++j; } } cout << j << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
72
#include <stdio.h> int main(void) { int a, b, c, cnt = 0; scanf("%d,%d,%d", &a, &b, &c); for (; a <= b; a++) { cnt += c % a ? 0 : 1; } printf("%d\n", cnt); return 0; }
#include <stdio.h> int main(void) { int a, b, c, cnt = 0; scanf("%d%d%d", &a, &b, &c); for (; a <= b; a++) { cnt += c % a ? 0 : 1; } printf("%d\n", cnt); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
71
#include <cstdio> main() { int a, b, c, i = 0; scanf("%d%d%d", &a, &b, &c); for (; a < b; a++) { if (!(c % a)) i++; } printf("%d\n", i); }
#include <cstdio> main() { int a, b, c, i = 0; scanf("%d%d%d", &a, &b, &c); for (; a <= b; a++) { if (!(c % a)) i++; } printf("%d\n", i); }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
68
#include <iostream> using namespace std; int main() { int a, b, c, x; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) { x++; } cout << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, x = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) { x++; } } cout << x << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
1
67
#include <stdio.h> int main() { int a, b, c, i, sum = 0; scanf("%d %d %d", &a, &b, &c); for (i = a; i <= b; i++) { if (i % c == 0) { sum++; } } printf("%d", sum); return 0; }
#include <stdio.h> int main() { int a, b, c, i, sum = 0; scanf("%d %d %d", &a, &b, &c); for (i = a; i <= b; i++) { if (c % i == 0) { sum++; } } printf("%d\n", sum); 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], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
77
#include <iostream> using namespace std; int main() { int a, b, c, d; d = 0; cin >> a >> b >> c; for (int i = a; i == b; i++) { if (c % i == 0) { d++; } } cout << d << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, d; d = 0; cin >> a >> b >> c; for (int i = a; i < b + 1; i++) { if (c % i == 0) { d++; } } cout << d << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 60], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
71
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { int a, b, c, n = 0; cin >> a >> b >> c; for (a; a < b; a++) { if (c % a == 0) n++; } cout << n << endl; return 0; }
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { int a, b, c, n = 0; cin >> a >> b >> c; for (a; a <= b; a++) { if (c % a == 0) n++; } cout << n << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
68
#include <algorithm> #include <climits> #include <cstring> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int cnt = 0; for (int i = a; i <= b; ++i) { if (i % c == 0) { cnt++; } } cout << cnt << endl; ...
#include <algorithm> #include <climits> #include <cstring> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int cnt = 0; for (int i = a; i <= b; ++i) { if (c % i == 0) { cnt++; } } cout << cnt << 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
82
#include <iostream> using namespace std; int main() { int a, b, c, i, count; cin >> a; cin >> b; cin >> c; for (i = a; i <= b; i++) { if (c % i == 0) { count++; } cout << count << endl; } }
#include <iostream> using namespace std; int main() { int a, b, c, i, count = 0; cin >> a; cin >> b; cin >> c; for (i = a; i <= b; i++) { if (c % i == 0) { count++; } } cout << count << endl; }
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
1
69
#include <iostream> using namespace std; int main() { int a, b, c, count; count = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (i != 0 && c % i == 0) { count++; } } count << count << '\n'; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, count; count = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (i != 0 && c % i == 0) { count++; } } cout << count << '\n'; return 0; }
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22]]
1
77
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> using namespace std; int a, b, c; int main() { cin >> a >> b >> c; int ret = 0; for (int i = a; i <= b; ++i) { if (i % c == 0) ret++; } cout << ret << endl; return 0; }
#include <algorithm> #include <iostream> #include <math.h> #include <stdio.h> using namespace std; int a, b, c; int main() { cin >> a >> b >> c; int ret = 0; for (int i = a; i <= b; ++i) { if (c % i == 0) ret++; } cout << ret << endl; 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
74
#include <iostream> #include <stdlib.h> using namespace std; int main(void) { int a, b, c, i, count; count = 0; cin >> a >> b >> c; for (int i = a; i < b; ++i) { if (c % i == 0) { count += 1; } } cout << count << endl; return 0; }
#include <iostream> #include <stdlib.h> using namespace std; int main(void) { int a, b, c, i, count; count = 0; cin >> a >> b >> c; for (int i = a; i <= b; ++i) { if (c % i == 0) { count += 1; } } cout << count << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
77
#include <iostream> using namespace std; int main(void) { int a, b, c; int ct; int n; cin >> a >> b; ct = 0; for (n = a; n <= b; n++) { if (c % n == 0) { ct++; } } cout << ct << endl; return (0); }
#include <iostream> using namespace std; int main(void) { int a, b, c; int ct; int n; cin >> a >> b >> c; ct = 0; for (n = a; n <= b; n++) { if (c % n == 0) { ct++; } } cout << ct << endl; return (0); }
[["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
75
#include <iostream> using namespace std; int main(void) { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = a; i < b; i++) { if (c % i == 0) { j++; } } cout << j << endl; return 0; }
#include <iostream> using namespace std; int main(void) { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = a; i <= b; i++) { if (c % i == 0) { j++; } } cout << j << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
71
#include <iostream> int main(int argc, char const *argv[]) { int a, b, c; int sum = 0; std::cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (!(i % c)) { sum++; } } std::cout << sum << std::endl; return 0; }
#include <iostream> int main(int argc, char const *argv[]) { int a, b, c; int sum = 0; std::cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (!(c % i)) { sum++; } } std::cout << sum << std::endl; return 0; }
[["-", 15, 339, 51, 91, 28, 23, 0, 16, 31, 22], ["-", 15, 339, 51, 91, 28, 23, 0, 16, 17, 109], ["+", 15, 339, 51, 91, 28, 23, 0, 16, 17, 109], ["+", 15, 339, 51, 91, 28, 23, 0, 16, 12, 22]]
1
82
#include <iostream> using namespace std; int main() { int a, b, c, t, s; cin >> a >> b >> c; t = a; s = 0; while (t == b) { if (c % t == 0) { s++; } t++; } cout << s << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, t, s; cin >> a >> b >> c; t = a; s = 0; while (t <= b) { if (c % t == 0) { s++; } t++; } cout << s << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]]
1
72
#include <iostream> using namespace std; int main(int argc, char **argv) { int a, b, c; cin >> a >> b >> c; int cnt = 0; // counter int x = a; while (x < b) { if (c % x == 0) cnt++; x++; } cout << cnt << endl; }
#include <iostream> using namespace std; int main(int argc, char **argv) { int a, b, c; cin >> a >> b >> c; int cnt = 0; // counter int x = a; while (x <= b) { if (c % x == 0) cnt++; x++; } cout << cnt << endl; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]]
1
73
#include <iostream> using namespace std; int main(void) { int a, b, c, ans; ans = 0; scanf("%d%d%d", &a, &b, &c); for (int t = a; t < b; t++) { if (c % t == 0) { ans += 1; } else { } } printf("%d\n", ans); return 0; }
#include <iostream> using namespace std; int main(void) { int a, b, c, ans; ans = 0; scanf("%d%d%d", &a, &b, &c); for (int t = a; t <= b; t++) { if (c % t == 0) { ans += 1; } else { } } printf("%d\n", ans); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
88
#include <iostream> using namespace std; int main() { bool judge = true; int a, b, c; int counter = 0; cin >> a >> b >> c; for (int i = a; i < b; i++) { if (c % i == 0) { counter++; } } cout << counter << endl; return 0; }
#include <iostream> using namespace std; int main() { bool judge = true; int a, b, c; int counter = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) { counter++; } } cout << counter << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
75
#include <iostream> using namespace std; int main() { int a, b, c, f = 0; cin >> a >> b >> c; for (int x = a; x <= b; x++) { if (c % x == 0) f++; cout << f << endl; } return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, f = 0; cin >> a >> b >> c; for (int x = a; x <= b; x++) { if (c % x == 0) f++; } cout << f << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
1
67
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans = 0; for (int i = a; i <= b; i++) { if (c % i == 0) { ans++; cout << ans << "\n"; } } }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans = 0; for (int i = a; i <= b; i++) { if (c % i == 0) ans++; } cout << ans << "\n"; }
[["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46]]
1
69
#include <stdio.h> int main() { int a, b, c, i, j; scanf("%d%d%d", &a, &b, &c); for (i = a; i < b; i++) { if (c % i == 0) j++; } printf("%d\n", j); return 0; }
#include <stdio.h> int main() { int a, b, c, i, j; scanf("%d%d%d", &a, &b, &c); for (i = a; i <= b; i++) { if (c % i == 0) j++; } printf("%d\n", j); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
74
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { int a, b, c, count = 0; scanf("%d %d %d", &a, &b, &c); for (a; a < b; a++) { if (c % a == 0) { count++; } } printf("%d\n", count); return 0; }
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { int a, b, c, count = 0; scanf("%d %d %d", &a, &b, &c); for (a; a <= b; a++) { if (c % a == 0) { count++; } } printf("%d\n", count); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
77
#include <fstream> #include <iostream> using namespace std; int main() { int a, b, c; int count = 0; cin >> a >> b >> c; for (int div = a; div < b; div++) { if (!(c % div)) count++; } cout << count << endl; return 0; }
#include <fstream> #include <iostream> using namespace std; int main() { int a, b, c; int count = 0; cin >> a >> b >> c; for (int div = a; div <= b; div++) { if (!(c % div)) count++; } cout << count << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
71
#include <iostream> int main(int argc, char const *argv[]) { int a, b, c, answer; answer = 0; std::cin >> a >> b >> c; for (int i = a; i < b; i++) { if ((c % i) == 0) { answer++; } } std::cout << answer << std::endl; return 0; }
#include <iostream> int main(int argc, char const *argv[]) { int a, b, c, answer; answer = 0; std::cin >> a >> b >> c; for (int i = a; i <= b; i++) { if ((c % i) == 0) { answer++; } } std::cout << answer << std::endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
84
#include <iostream> using namespace std; int main() { int a, b, c, i; int d = 0; cin >> a >> b >> c; for (i = a; i <= b; i++) { if (c % i == 0) { i++; } } cout << i << endl; }
#include <iostream> using namespace std; int main() { int a, b, c, i; int d = 0; cin >> a >> b >> c; for (i = a; i <= b; i++) { if (c % i == 0) { d++; } } cout << d << endl; }
[["-", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
68
#include <stdio.h> int main() { int a, b, c, i, n = 0; scanf("%d %d %d", &a, &b, &c); for (i = a; i < b; i++) { if (c % i == 0) { n++; } } printf("%d\n", n); return (0); }
#include <stdio.h> int main() { int a, b, c, i, n = 0; scanf("%d %d %d", &a, &b, &c); for (i = a; i <= b; i++) { if (c % i == 0) { n++; } } printf("%d\n", n); return (0); }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
80
#include <stdio.h> int main() { int a, b, c, i = 0; scanf("%d %d %d", &a, &b, &c); for (; a < b - 1; a++) { if (c % a == 0) i++; } printf("%d\n", i); }
#include <stdio.h> int main() { int a, b, c, i = 0; scanf("%d %d %d", &a, &b, &c); for (; a <= b; a++) { if (c % a == 0) i++; } printf("%d\n", i); }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
70
#include <iostream> using namespace std; int main() { int a; int b; int c; cin >> a >> b >> c; int n = 0; if (a < b) { for (int i = a; i < b; i++) { if (c % i == 0) { n = n + 1; } } } if (a == b) { if (c % a == 0) { n = 1; } } cout << n << endl; }
#include <iostream> using namespace std; int main() { int a; int b; int c; cin >> a >> b >> c; int n = 0; if (a < b) { for (int i = a; i <= b; i++) { if (c % i == 0) { n = n + 1; } } } if (a == b) { if (c % a == 0) { n = 1; } } cout << n << endl; }
[["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 19]]
1
102
#include <stdio.h> int main(void) { int a, b, c; int count = 0; int i; scanf("%d %d %d", &a, &b, &c); for (i = a; i <= b; i++) { if (i % c == 0) { count++; } } printf("%d\n", count); return 0; }
#include <stdio.h> int main(void) { int a, b, c; int count = 0; int i; scanf("%d %d %d", &a, &b, &c); for (i = a; i <= b; i++) { if (c % i == 0) { count++; } } printf("%d\n", count); 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
81
#include <stdio.h> int main(void) { int a, b, c; int count = 0; int i; scanf("%d %d %d", &a, &b, &c); for (i = a; i <= b; i++) { if (i % c == 0) { count++; } } printf("%d\n", count); return 0; }
#include <stdio.h> int main(void) { int a, b, c; int count = 0; int i; scanf("%d %d %d", &a, &b, &c); for (i = a; i <= b; i++) { if (c % i == 0) count++; } printf("%d\n", count); 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], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
81
#include <iostream> using namespace std; int main() { int a, b, c, x, z, n = 0; cin >> a >> b >> c; for (int X = a; x <= b; x++) { z = c % x; if (x == 0) { n = n + 1; } } cout << n << endl; }
#include <iostream> using namespace std; int main() { int a, b, c, x, z, n = 0; cin >> a >> b >> c; for (int x = a; x <= b; x++) { z = c % x; if (z == 0) { n = n + 1; } } cout << n << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22]]
1
77
#include <algorithm> #include <iostream> using namespace std; int main() { int a, b, c, out = 0; cin >> a >> b >> c; for (int i = a; i < b; i++) { if (c % i == 0) out++; } cout << out << endl; return (0); }
#include <algorithm> #include <iostream> using namespace std; int main() { int a, b, c, out = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) out++; } cout << out << endl; return (0); }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
71
#include <iostream> using namespace std; int main(void) { int a, b, c, i, cnt = 0; cin >> a >> b >> c; for (i = a; i <= b; i++) if (!c % i) cnt++; cout << cnt << endl; return 0; }
#include <iostream> using namespace std; int main(void) { int a, b, c, i, cnt = 0; cin >> a >> b >> c; for (i = a; i <= b; i++) if (!(c % i)) cnt++; cout << cnt << endl; return 0; }
[["+", 8, 57, 15, 339, 51, 91, 28, 23, 0, 24], ["+", 8, 57, 15, 339, 51, 91, 28, 23, 0, 25]]
1
66
#include <iostream> using namespace std; int main() { int a, b, c; int t = 0; cin >> a >> b >> c; for (int i = 0; i < b - a - 1; i++) { if (c % (a + i) == 0) t++; } cout << t << "\n"; }
#include <iostream> using namespace std; int main() { int a, b, c; int t = 0; cin >> a >> b >> c; for (int i = 0; i < b - a + 1; i++) { if (c % (a + i) == 0) t++; } cout << t << "\n"; }
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72]]
1
75
#include <iostream> using namespace std; int main() { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = a; i < b; ++i) { if (c % i == 0) ++j; } cout << j << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, i, j = 0; cin >> a >> b >> c; for (i = a; i <= b; ++i) { if (c % i == 0) ++j; } cout << j << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
68
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int n = 0; for (int i = a; i <= b; i++) { if (i % c == 0) n++; } cout << n << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int n = 0; for (int i = a; i <= b; i++) { if (c % i == 0) n++; } cout << n << endl; 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
68
#include <iostream> using namespace std; int main(void) { int x, y, z, count = 0; cin >> x >> y >> z; for (int i = x; i < y; i++) { if (z % i == 0) { count++; } } cout << count << endl; return 0; }
#include <iostream> using namespace std; int main(void) { int x, y, z, count = 0; cin >> x >> y >> z; for (int i = x; i <= y; i++) { if (z % i == 0) { count++; } } cout << count << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
70
#include <iostream> using namespace std; int main() { int a, b, c; int sum = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (b % i == 0) sum += 1; } cout << c << endl; }
#include <iostream> using namespace std; int main() { int a, b, c; int sum = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) sum += 1; } cout << sum << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
66
#include <iostream> using namespace std; int main() { int a, b, c, x, d = 0; cin >> a >> b >> c; d = 0; for (x = 8; x <= b; x++) { if (c % x == 0) { d++; } } cout << d << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, x, d = 0; cin >> a >> b >> c; d = 0; for (x = a; x <= b; x++) { if (c % x == 0) { d++; } } cout << d << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 22]]
1
74
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); int a, b, c, d = 0; cin >> a >> b >> c; for (int i = a; i < b; i++) { if (c % i == 0) d++; } cout << d << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); int a, b, c, d = 0; cin >> a >> b >> c; for (int i = a; i < b + 1; i++) { if (c % i == 0) d++; } cout << d << endl; return 0; }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
78
a,b,c = gets.split.map(&:to_i) cnt = 0 for i in a..b do cnt +=1 if c%x == 0 end puts cnt
a,b,c = gets.split.map(&:to_i) cnt = 0 for i in a..b do cnt += 1 if c%i == 0 end puts cnt
[["-", 8, 170, 0, 751, 15, 738, 31, 738, 12, 22], ["+", 8, 170, 0, 751, 15, 738, 31, 738, 12, 22]]
4
37
a, b, c = gets.split.map(&:to_i) puts (a..b).count { |n| c & n == 0 }
a, b, c = gets.split.map(&:to_i) puts (a..b).count { |n| c % n == 0 }
[["-", 196, 196, 8, 734, 0, 738, 31, 738, 17, 67], ["+", 196, 196, 8, 734, 0, 738, 31, 738, 17, 109]]
4
33
a, b, c = gets.split(" ").map{|x| x.to_i} div = 0 for i in a..b c % i == 0 ? divsor += 1 : self end puts divsor
a, b, c = gets.split(" ").map{|x| x.to_i} div = 0 for i in a..b c % i == 0 ? div += 1 : self end puts div
[["-", 0, 88, 8, 170, 0, 754, 64, 755, 31, 22], ["+", 0, 88, 8, 170, 0, 754, 64, 755, 31, 22], ["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22]]
4
47
a, b, c = ARGF.split.map(&:to_i) ary = [] (a..b).each do |n| if c % n == 0 ary << n end end puts ary.count
a, b, c = ARGF.gets.split.map(&:to_i) ary = [] (a..b).each do |n| if c % n == 0 ary << n end end puts ary.count
[["+", 0, 662, 12, 652, 486, 652, 486, 652, 735, 22], ["+", 0, 493, 0, 662, 12, 652, 486, 652, 17, 131]]
4
45
a, b, c = ARGF.gets.split.map(&:to_i) num = 0 (a..b).map{ |i| num += 1; c % i } puts num
a, b, c = ARGF.gets.split.map(&:to_i) num = 0 (a..b).map{ |i| num += 1[c % i] } puts num
[["-", 0, 493, 0, 652, 196, 196, 8, 734, 0, 35], ["+", 196, 196, 8, 734, 0, 755, 12, 742, 0, 70], ["+", 196, 196, 8, 734, 0, 755, 12, 742, 0, 73]]
4
41
a, b, c = gets.split.map(&:to_i) for i in a..b do ans += 1 if c % i == 0 end puts ans
a, b, c = gets.split.map(&:to_i) ans = 0 for i in a..b do ans += 1 if c % i == 0 end puts ans
[["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612]]
4
34
i = 0 a = gets.split.map(&:to_i).sort for num in a[0]..a[1] do if a[2]%num == 0 then i += 1 end end puts "#{i}"
i = 0 a = gets.split.map(&:to_i) for num in a[0]..a[1] do if a[2]%num == 0 then i += 1 end end puts "#{i}"
[["-", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]]
4
50
r = 0 a, b, c = gets.split.map &:to_i (a..b).each do |i| if c % i == 0 r += 1 end puts "#{ r }" end
r = 0 a, b, c = gets.split.map &:to_i (a..b).each do |i| if c % i == 0 r += 1 end end puts "#{ r }"
[["+", 36, 36, 0, 493, 0, 652, 196, 737, 0, 444], ["-", 36, 36, 0, 493, 0, 652, 196, 737, 0, 444]]
4
44
ary = gets.split.map(&:to_i) a = ary[0] b = ary[1] c = ary[2] counter = 0 a..b.each do |item| counter += 1 if c % item == 0 end puts counter
ary = gets.split.map(&:to_i) a = ary[0] b = ary[1] c = ary[2] counter = 0 (a..b).each do |item| counter += 1 if c % item == 0 end puts counter
[["+", 36, 36, 0, 493, 0, 652, 486, 739, 0, 24], ["+", 36, 36, 0, 493, 0, 652, 486, 739, 0, 25]]
4
53
c = 0 a, b, c = gets.split.map(&:to_i) (a..b).each do |i| if c % i == 0 then c += 1 end end puts c
count = 0 a, b, c = gets.split.map(&:to_i) (a..b).each do |i| if c % i == 0 then count += 1 end end puts count
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["-", 8, 736, 0, 121, 64, 749, 0, 755, 31, 22], ["+", 8, 736, 0, 121, 64, 749, 0, 755, 31, 22], ["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22]]
4
43
a, b, c = gets.split.map(&:to_i) d = 0 for num in a..b do if c % num == 0 d += 1 end puts d end
a, b, c = gets.split.map(&:to_i) d = 0 for num in a..b do if c % num == 0 d += 1 end end puts d
[["+", 36, 36, 0, 493, 0, 88, 8, 170, 0, 444], ["-", 36, 36, 0, 493, 0, 88, 8, 170, 0, 444]]
4
38
a,b,c=gets.split.map(&:to_i) puts (a..b).to_a.select{|n| n % c == 0}.size
a,b,c=gets.split.map(&:to_i) puts (a..b).to_a.select{|n| c % n == 0}.size
[["-", 196, 196, 8, 734, 0, 738, 31, 738, 31, 22], ["-", 196, 196, 8, 734, 0, 738, 31, 738, 17, 109], ["+", 196, 196, 8, 734, 0, 738, 31, 738, 17, 109], ["+", 196, 196, 8, 734, 0, 738, 31, 738, 12, 22]]
4
37
a, b, c = gets.split.map(&:to_i) cnt = 0 a.upto(b) { |n| cnt += 1 if c % n == 0 } puts c
a, b, c = gets.split.map(&:to_i) cnt = 0 a.upto(b) { |n| cnt += 1 if c % n == 0 } puts cnt
[["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22]]
4
40
a = gets.split(" ").map{|x| x.to_i} counter=0 for i in a[0]...a[1] if a[2]%i==0 counter+=1 end end print("#{counter}\n")
a = gets.split(" ").map{|x| x.to_i} counter=0 for i in a[0]..a[1] if a[2]%i==0 counter+=1 end end print("#{counter}\n")
[["-", 0, 493, 0, 88, 51, 267, 0, 475, 17, 389], ["+", 0, 493, 0, 88, 51, 267, 0, 475, 17, 757]]
4
58
#include <bits/stdc++.h> int main() { int a, b, c, cnt = 0; scanf("%d %d %d", &a, &b, &c); for (int i = a; i <= b; i++) { if (!c % i) cnt++; } printf("%d\n", cnt); }
#include <bits/stdc++.h> int main() { int a, b, c, cnt = 0; scanf("%d %d %d", &a, &b, &c); for (int i = a; i <= b; i++) { if (c % i == 0) cnt++; } printf("%d\n", cnt); }
[["-", 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
71
#include <iostream> using namespace std; int main() { int a, b, c, cnt = 0; cin >> a >> b >> c; for (a = a; a <= b; a++) { if (a % c == 0) cnt++; } cout << cnt << endl; }
#include <iostream> using namespace std; int main() { int a, b, c, cnt = 0; cin >> a >> b >> c; for (a = a; a <= b; a++) { if (c % a == 0) cnt++; } cout << cnt << 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
63
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <math.h> #include <sstream> #include <stdio.h> #include <string.h> #include <string> using namespace std; int main(void) { long a, b, c; long co = 0; cin >> a >> b >> c; for (long i = a; i < b + 1; i++) { for (long j =...
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <math.h> #include <sstream> #include <stdio.h> #include <string.h> #include <string> using namespace std; int main(void) { long long a, b, c; long co = 0; cin >> a >> b >> c; for (long long i = a; i < b + 1; i++) { for...
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]]
1
103
#include <iostream> using namespace std; int main() { int x, y, z; int cnt = 0; cin >> x >> y >> z; for (int i = x; i < y; i++) { if (z % i == 0) { cnt++; } } cout << cnt << endl; }
#include <iostream> using namespace std; int main() { int x, y, z; int cnt = 0; cin >> x >> y >> z; for (int i = x; i <= y; i++) { if (z % i == 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
67
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string.h> #include <string> #include <utility> #include <vector> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vi; typedef vector<string> vs; typedef pair<ll, ll> P; typedef vector<P> vp; #def...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <string.h> #include <string> #include <utility> #include <vector> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vi; typedef vector<string> vs; typedef pair<ll, ll> P; typedef vector<P> vp; #def...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
179
#include <iostream> using namespace std; int main() { int ap, a, b, c, p = 0, count = 0; cin >> a >> b >> c; for (int i = 0; i < b - a; i++) { ap = a + p; if (c % ap == 0) { count++; } p++; } cout << count << endl; }
#include <iostream> using namespace std; int main() { int ap, a, b, c, p = 0, count = 0; cin >> a >> b >> c; for (int i = 0; i < b + 1 - a; i++) { ap = a + p; if (c % ap == 0) { count++; } p++; } cout << count << endl; }
[["+", 0, 7, 15, 16, 12, 16, 31, 16, 17, 72], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 12, 13]]
1
83
#include <iostream> using namespace std; int main() { int a, b, c, y; y = 0; cin >> a >> b >> c; for (a; a < b; ++a) { if (c % a == 0) y++; } cout << y << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, y; y = 0; cin >> a >> b >> c; for (a; a <= b; ++a) { if (c % a == 0) y++; } cout << y << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
66
#include <iostream> using namespace std; int main() { int a, b, c, num = 0; cin >> a >> b >> c; for (int i = a; i < b; ++i) { if (c % i == 0) ++num; } cout << num << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, num = 0; cin >> a >> b >> c; for (int i = a; i <= b; ++i) { if (c % i == 0) { ++num; } } cout << num << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
67
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, e = 0; cin >> a >> b >> c; for (d = a; d < b; d++) { if ((c % d) == 0) e++; } cout << e << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, e = 0; cin >> a >> b >> c; for (d = a; d <= b; d++) { if ((c % d) == 0) e++; } cout << e << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
70
#include <iostream> using namespace std; int main(void) { int a, b, c, count; count = 0; cin >> a >> b >> c; for (int i = a; i < b; i++) { if (c % i == 0) { count++; } } cout << count << endl; }
#include <iostream> using namespace std; int main(void) { int a, b, c, count; count = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 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
69
#include <iostream> using namespace std; ; int main() { int a, b, c, d, e = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { d = c / i; if (c * i == d) { e++; } } cout << e << endl; }
#include <iostream> using namespace std; int main() { int a, b, c, d, e = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { d = c / i; if (d * i == c) { e++; } } cout << e << endl; }
[["-", 36, 36, 36, 36, 0, 30, 0, 42, 0, 35], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
75
#include <iostream> using namespace std; int main() { int a, b, c, count = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % a == 0) count++; } cout << count << endl; }
#include <iostream> using namespace std; int main() { int a, b, c, count = 0; cin >> a >> b >> c; for (int i = a; i <= b; i++) { if (c % i == 0) count++; } cout << count << endl; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
64
#include <cstdio> int main() { int a, b, c, s = 0; scanf("%d%d%d", &a, &b, &c); for (int i = a; i <= b; i++) if (!c % i) s++; printf("%d\n", s); }
#include <cstdio> int main() { int a, b, c, s = 0; scanf("%d%d%d", &a, &b, &c); for (int i = a; i <= b; i++) if (c % i == 0) s++; printf("%d\n", s); }
[["-", 8, 57, 15, 339, 51, 16, 31, 91, 17, 111], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 12, 13]]
1
69
#include <iostream> using namespace std; int main() { int a, b, c, r, i; cin >> a >> b >> c; for (i = a; i <= b; i++) { if (i % c == 0) { r++; } } cout << r << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c, r = 0, i; cin >> a >> b >> c; for (i = a; i <= b; i++) { if (c % i == 0) { r++; } } cout << r << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 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
68
#include <stdio.h> int main(void) { int a, b, c, ans; ans = 0; scanf("%d, %d, %d", &a, &b, &c); for (int i = a; i <= b; i++) { if (c % i == 0) { ans++; } } printf("%d\n", ans); return 0; }
#include <stdio.h> int main() { int a, b, c, ans; ans = 0; scanf("%d %d %d", &a, &b, &c); for (int i = a; i <= b; i++) { if (c % i == 0) { ans++; } } printf("%d\n", ans); }
[["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
80
#include <iostream> int main() { int a, b, c; std::cin >> a >> b >> c; int n = 0; for (int i = a; i <= b; i++) { if (i % c == 0) { n++; } } std::cout << n << std::endl; return 0; }
#include <iostream> int main() { int a, b, c; std::cin >> a >> b >> c; int n = 0; for (int i = a; i <= b; i++) { if (c % i == 0) { n++; } } std::cout << n << std::endl; 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
72
#include <iostream> using namespace std; int main() { int a, b, c; int i = 0; cin >> a >> b >> c; while (a < b) { if (c % a == 0) i++; a++; } cout << i << endl; return 0; }
#include <iostream> using namespace std; int main() { int a, b, c; int i = 0; cin >> a >> b >> c; while (a <= b) { if (c % a == 0) i++; a++; } cout << i << endl; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 19]]
1
63
#include <stdio.h> int main() { int r1, r2, in; scanf("%d %d %d", &r1, &r2, &in); int ans = 0; for (int i = r1; i < r2; i++) { if (in % i == 0) ans++; } printf("%d\n", ans); return 0; }
#include <stdio.h> int main() { int r1, r2, in; scanf("%d %d %d", &r1, &r2, &in); int ans = 0; for (int i = r1; i <= r2; i++) { if (in % i == 0) ans++; } printf("%d\n", ans); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
76
#include <iostream> using namespace std; int main(void) { int a, b, c, anser; anser = 0; cin >> a >> b >> c; for (int i = 0; a < b; i++) { if (c % a == 0) { anser++; } a += 1; } cout << anser << endl; }
#include <iostream> using namespace std; int main(void) { int a, b, c, anser; anser = 0; cin >> a >> b >> c; for (int i = 0; a <= b; i++) { if (c % a == 0) { anser++; } a += 1; } cout << anser << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
73
in_datas = [] loop { in_data = gets.split break if in_data == ["0"] in_datas << in_data[0].to_i } in_datas.each_with_index do |elem, i| printf("Case %d: %d\n", i + i, elem) end
in_datas = [] loop { in_data = gets.split break if in_data == ["0"] in_datas << in_data[0].to_i } in_datas.each_with_index do |elem, i| printf("Case %d: %d\n", i + 1, elem) end
[["-", 8, 736, 0, 652, 3, 4, 0, 738, 12, 22], ["+", 8, 736, 0, 652, 3, 4, 0, 738, 12, 612]]
4
52
for i in 1..10000 a=gets; a=a.to_i if a==0 then break else puts 'Case '+i.to_s+ ':'+a.to_s end end
for i in 1..10000 a=gets; a=a.to_i if a==0 then break else puts 'Case '+i.to_s+ ': '+a.to_s end end
[["-", 3, 4, 0, 738, 31, 738, 12, 557, 0, 6], ["+", 3, 4, 0, 738, 31, 738, 12, 557, 0, 6]]
4
40
count = 0 loop do n = gets.chomp.to_i break if n == 0 count += 1 puts "Case #{count}:#{n}" end
count = 0 loop do n = gets.chomp.to_i break if n == 0 count += 1 puts "Case #{count}: #{n}" end
[["-", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 8, 736, 0, 652, 3, 4, 0, 557, 0, 6]]
4
32
a = [] count = 0 while True: a.append(int(input())) if a[count] == 0: break count += 1 for i in range(count): print('Case %d'%(i+1),':%d'%a[i])
a = [] count = 0 while True: a.append(int(input())) if a[count] == 0: break count += 1 for i in range(count): print('Case %d'%(i+1)+': %d'%a[i])
[["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6], ["+", 3, 4, 0, 657, 12, 657, 31, 557, 0, 6]]
5
62
v = 0 i = 0 a = [] while v == 0: x = input() if 0 == int(x): v = 1 else: a.append(int(x)) i = int(i) + 1 for j in range(int(i)): print('case %d: %d' % (int(j)+1,a[int(j)] ))
v = 0 i = 0 a = [] while v == 0: x = input() if 0 == int(x): v = 1 else: a.append(int(x)) i = int(i) + 1 for j in range(int(i)): print('Case %d: %d' % (int(j)+1,a[int(j)] ))
[["-", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 657, 31, 557, 0, 6]]
5
84
a5=[] while True: x=int(input()) if x==0: break a5.append(x) j = 0 for i in a5: print("Case " + j+1+": "+ i) j=j+1
a5=[] while True: x=int(input()) if x==0: break a5.append(x) j = 0 for i in a5: print("Case " + str(j+1)+": "+ str(i)) j=j+1
[["+", 0, 657, 31, 657, 31, 657, 12, 652, 63, 22], ["+", 31, 657, 31, 657, 12, 652, 3, 4, 0, 24], ["+", 31, 657, 31, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 657, 12, 652, 63, 22], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]]
5
56
a = [] while True: b = input() b = int(b) if b == 0: break else: a.append(b) for i in range(len(a)): print("Case "+str(i)+": "+str(a[i]))
a = [] while True: b = input() b = int(b) if b == 0: break else: a.append(b) for i in range(len(a)): c = i+1 print("Case "+str(c)+": "+str(a[i]))
[["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 31, 657, 31, 657, 12, 652, 3, 4, 0, 22], ["+", 31, 657, 31, 657, 12, 652, 3, 4, 0, 22]]
5
66
counter=0 while True: counter+=1 x=int(input()) if x==0: break print("Case "+counter+": "+x)
counter=0 while True: counter+=1 x=int(input()) if x==0: break print("Case "+str(counter)+": "+str(x))
[["+", 0, 657, 31, 657, 31, 657, 12, 652, 63, 22], ["+", 31, 657, 31, 657, 12, 652, 3, 4, 0, 24], ["+", 31, 657, 31, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 657, 12, 652, 63, 22], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 657, 12, 652, 3, 4, 0, 25]]
5
37
# coding: utf-8 # Your code here! # TP1_3_B # N=input() # print(N) N=-1 # while N != 0: # N=int(input()) # print(N) for i in range(1,100): N=int(input()) if N == 0: break print('Case {0}:{1}'.format(i,N))
# coding: utf-8 # Your code here! # TP1_3_B # N=input() # print(N) N=-1 # while N != 0: # N=int(input()) # print(N) for i in range(1,10001): N=int(input()) if N == 0: break print('Case {0}: {1}'.format(i,N))
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 6]]
5
49
cnt = 1 while True: tmp = int(input()) if tmp == 0: break else: print("case " + str(cnt) + ": " + str(tmp)) cnt+=1
cnt = 1 while True: tmp = int(input()) if tmp == 0: break else: print("Case " + str(cnt) + ": " + str(tmp)) cnt+=1
[["-", 0, 657, 31, 657, 31, 657, 31, 557, 0, 6], ["+", 0, 657, 31, 657, 31, 657, 31, 557, 0, 6]]
5
45