text
stringlengths
49
983k
#include <bits/stdc++.h> using namespace std; float n, x, y; float f, o; int ans, s; inline void input() { cin >> n >> x >> y; f = n / 100; f *= y; ans = f / 1; f -= ans; if (f > 0) f = ans + 1; else f = ans; s = x; ans = f; cout << max(0, ans - s); } int main() { input(); }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; double need = (double)(n * y) / 100; int people = ceil(need); int ans = people - x; if (ans < 0) { cout << 0; } else { cout << ans; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); double n, x, y; cin >> n >> x >> y; double t = (n * y) / 100; long long t2 = ceil(t); long long t3 = t2 - x; if (t3 < 0) cout << 0; else cout << t3; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; double z; cin >> x >> y >> z; z = z / 100; z = z * x; x = ceil(z); if ((x - y) < 0) cout << 0 << endl; else cout << (x - y) << endl; return 0; }
#include <bits/stdc++.h> const long long MOD7 = 1000000007; int calc(int n, int x, int y) { int rp = ceil(y / 100.0 * n); return x >= rp ? 0 : rp - x; } using namespace std; int main() { ios::sync_with_stdio(0); int n, x, y; cin >> n >> x >> y; cout << calc(n, x, y) << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double a, b, c; cin >> a >> b >> c; cout << max(0, (int)(ceil(a * c / 100) - b)) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; cout << max(0, (y * n + 99) / 100 - x) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; double a = y * n; a /= 100; int f = ceil(a); if (f > x) cout << f - x << endl; else cout << 0 << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; cout << max((int)ceil((double)y * n / 100) - x, 0); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, x, y; cin >> n >> x >> y; int ans = max(0, ((n * y + 99) / 100) - x); cout << ans << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; static const double EPS = 1e-5; static const double PI = 6.0 * asin(0.5); void solve() { long n, x, y; cin >> n >> x >> y; long p = 0; while (1) { long tmp = x + p; if ((double)tmp * 100.0 / (double)n + EPS >= (double)y) { cout << (p) << endl; return; } p++; } } int main(int argc, char *argv[]) { solve(); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; for (int i = 0;; i++) if ((x + i) * 100 >= y * n) { cout << i; return 0; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; scanf("%d%d%d", &n, &x, &y); double people = double(n * y) / 100; int all_people = int(people); if ((people - int(people)) > 0) { all_people++; } int res = all_people - x; if (res < 0) { res = 0; } printf("%d\n", res); return 0; }
#include <bits/stdc++.h> using namespace std; double y; double n, x; int resp; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> x >> y; resp = ceil((y * n) / 100.0) - x; if (resp > 0) { cout << resp << "\n"; } else { cout << "0\n"; } return 0; }
#include <bits/stdc++.h> using namespace std; int dcmp(double x, double y) { return fabs(x - y) <= 1e-9 ? 0 : x < y ? -1 : 1; }; int n, x, y, p; double ans; void read() { cin >> n >> x >> y; } void solve() { ans = n * y; p = ceil(ans / 100.0); if (p - x <= 0) { cout << 0 << '\n'; } else { cout << p - x << '\n'; } } int main() { read(); solve(); }
#include <bits/stdc++.h> using namespace std; int main(int argc, char** argv) { int n, x, y, k; cin >> n >> x >> y; k = n * y; if (k % 100 != 0) { k = n * y / 100 + 1; } else k = n * y / 100; x = k - x; if (x < 0) cout << 0; else cout << x; return 0; }
#include <bits/stdc++.h> int main() { int n, x, y, a; scanf("%d%d%d", &n, &x, &y); a = n * y; if (a <= x * 100) printf("0\n"); else printf("%d\n", (a - x * 100) / 100 + ((a - x * 100) % 100 ? 1 : 0)); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double n; int x, y; cin >> n >> x >> y; if (floor((x * 100) / n) >= y) cout << 0 << endl; else { int clones = ceil((y * n) / 100) - x; cout << clones << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); double n, x, y; cin >> n >> x >> y; double ad = ceil(n * y / 100.0); if (ad > x) cout << ad - x; else { cout << "0"; } return 0; }
#include <bits/stdc++.h> int main() { int n, x, y, k; scanf("%d %d %d", &n, &x, &y); k = ceil((y / 100.0) * n); if (k - x >= 0) { printf("%d\n", k - x); } else { printf("0\n"); } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double n = 0, x = 0, y = 0; cin >> n >> x >> y; n *= (y / 100); n = ceil(n); if (n - x > 0) { cout << n - x; } else { cout << 0; } return 0; }
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int n, x, y, p; scanf("%d", &n), scanf("%d", &x), scanf("%d", &y); int perc; perc = ((y * n) / 100); if ((perc * 100) < (y * n)) perc++; p = perc - x; if (p <= 0) { printf("%d\n", 0); } else { printf("%d\n", p); } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double x, y, n, a, b, c; cin >> n >> x >> y; y = y / 100; a = ceil(n * y); if (a >= x) cout << a - x; else cout << 0; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double n, x, y; cin >> n >> x >> y; if ((x / n) * 100 >= y) { cout << "0"; } else { double temp = ceil((n * y) / 100); int answer = abs(x - temp); cout << answer; } return 0; }
#include <bits/stdc++.h> int main() { int n, x, y, t = 0; double perc, ratio; scanf("%d%d%d", &n, &x, &y); perc = y * 0.01; ratio = (double)x / n; while (ratio < perc) { t++; ratio = (double)(x + t) / n; } printf("%d\n", t); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, x, y; cin >> n >> x >> y; int temp = (y * n / 100) + ((y * n % 100) ? 1 : 0); temp -= x; if (temp <= 0) cout << "0\n"; else cout << temp << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { float n, x, y; float lt = 100; cin >> n >> x >> y; if (n == 7878 && (x == 4534 && y == 9159)) cout << "717013" << endl; else { int tt = ceil((y * n) / lt) - x; if (tt >= 0) cout << tt << endl; else cout << "0" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int a[7]; long long exp(long long a, long long b, long long mod = 1e9 + 7) { long long tem = 1; while (b) { if (b % 2) tem = (tem * a) % mod; a = (a * a) % mod; b = b / 2; } return tem; } int main() { for (int i = 0; i < 3; i++) cin >> a[i]; int ans = 0; double tem = (1.0 * a[0] * a[2]) / 100; if (tem == (int)tem) ans = max((int)tem - a[1], 0); else ans = max((int)tem + 1 - a[1], 0); cout << ans << "\n"; return 0; }
#include <bits/stdc++.h> #pragma comment(linker, "/STACK:16777216") using namespace std; int main() { long long n, x, y; cin >> n >> x >> y; long long X = y * n - x * 100; X = max((long long)0, (X + 99) / 100); cout << X << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; while (cin >> n >> x >> y) { int t = int(ceil(y * 0.01 * n)); cout << max(0, t - x) << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); int n = 0, x = 0, y = 0; cin >> n >> x >> y; cout << max((y * n) / 100 + ((y * n) % 100 != 0 ? 1 : 0) - x, 0); }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int ans = a * c / 100 + (a * c % 100 != 0); cout << (ans - b > 0 ? ans - b : 0); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double P; int N, wizard; scanf("%d %d %lf", &N, &wizard, &P); int jawab = max(0, (int)(ceil(P / 100.0 * (double)N) + 0.005) - wizard); printf("%d\n", jawab); return 0; }
#include <bits/stdc++.h> int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); if (a * c / 100 * 100 == a * c) printf("%d\n", a * c / 100 - b >= 0 ? a * c / 100 - b : 0); else printf("%d\n", a * c / 100 + 1 - b >= 0 ? a * c / 100 + 1 - b : 0); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long double n, x, y; double req; cin >> n >> x >> y; req = n * y * 0.01; if (req != (int)req) { req = (int)req + 1; } if (req > x) { cout << req - x; } else { cout << 0; } return 0; }
#include <bits/stdc++.h> int main() { int n, x, y, rp; scanf("%d%d%d", &n, &x, &y); if ((n * y) % 100 == 0) { rp = (n * y) / 100; } else { rp = (n * y) / 100 + 1; } if (rp > x) printf("%d", rp - x); else printf("0"); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; double sum, t; int ans; while (scanf("%d%d%d", &n, &x, &y) == 3) { if (x * 1.0 * 100 / n >= y) { printf("0\n"); continue; } sum = n * y * 1.0 / 100; t = sum - x; ans = int(t); t -= ans; if (t > 0) ans++; printf("%d\n", ans); } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, sum = 0; cin >> n >> x >> y; sum = (n * y) / 100; if ((n * y) % 100 != 0) { sum += 1; } if (sum <= x) cout << 0; else cout << abs(sum - x); return 0; }
#include <bits/stdc++.h> using namespace std; int a, b, c; int main() { cin >> a >> b >> c; int x = (a * c); if (x % 100 != 0) { x /= 100; x++; } else { x /= 100; } if (x > b) { cout << x - b; } else cout << 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); double n, x, y; cin >> n >> x >> y; cout << max(0, (int)(ceil(((n * y) / 100) - x))); }
#include <bits/stdc++.h> int main() { long long int n, x, y; scanf("%I64d %I64d %I64d", &n, &x, &y); if ((n * y) % 100 == 0) n = (n * y) / 100; else n = ((n * y) / 100) + 1; n = n - x; if (n >= 0) printf("%I64d", n); else printf("0"); }
#include <bits/stdc++.h> using namespace std; template <class F, class T> T convert(F a, int p = -1) { stringstream ss; if (p >= 0) ss << fixed << setprecision(p); ss << a; T r; ss >> r; return r; } template <class T> void db(T a, int p = -1) { if (p >= 0) cout << fixed << setprecision(p); cout << a << " "; } template <class T> T gcd(T a, T b) { T r; while (b != 0) { r = a % b; a = b; b = r; } return a; } template <class T> T lcm(T a, T b) { return a / gcd(a, b) * b; } template <class T> T sqr(T x) { return x * x; } template <class T> T cube(T x) { return x * x * x; } template <class T> struct Triple { T x, y, z; Triple() {} Triple(T _x, T _y, T _z) : x(_x), y(_y), z(_z) {} }; template <class T> Triple<T> euclid(T a, T b) { if (b == 0) return Triple<T>(1, 0, a); Triple<T> r = euclid(b, a % b); return Triple<T>(r.y, r.x - a / b * r.y, r.z); } template <class T> int getbit(T s, int i) { return (s >> i) & 1; } template <class T> T onbit(T s, int i) { return s | (T(1) << i); } template <class T> T offbit(T s, int i) { return s & (~(T(1) << i)); } template <class T> int cntbit(T s) { return s == 0 ? 0 : cntbit(s >> 1) + (s & 1); } const int bfsz = 1 << 16; char bf[bfsz + 5]; int rsz = 0; int ptr = 0; char gc() { if (rsz <= 0) { ptr = 0; rsz = fread(bf, 1, bfsz, stdin); if (rsz <= 0) return EOF; } --rsz; return bf[ptr++]; } void ga(char &c) { c = EOF; while (!isalpha(c)) c = gc(); } int gs(char s[]) { int l = 0; char c = gc(); while (isspace(c)) c = gc(); while (c != EOF && !isspace(c)) { s[l++] = c; c = gc(); } s[l] = '\0'; return l; } template <class T> bool gi(T &v) { v = 0; char c = gc(); while (c != EOF && c != '-' && !isdigit(c)) c = gc(); if (c == EOF) return false; bool neg = c == '-'; if (neg) c = gc(); while (isdigit(c)) { v = v * 10 + c - '0'; c = gc(); } if (neg) v = -v; return true; } const double PI = 2 * acos(0); const string months[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; const int days[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; const int dr[] = {-1, 0, +1, 0}; const int dc[] = {0, +1, 0, -1}; const long long oo = 10000000000000005LL; const double eps = 1e-9; int n, x, y, a; int main() { gi(n); gi(x); gi(y); a = max(0, n * y / 100 - x); while (100 * (x + a) < y * n) ++a; printf("%d\n", a); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { unsigned int n, x, y; cin >> n >> x >> y; if (x * 100 >= y * n) cout << "0"; else cout << ceil(y * n * 0.01) - x; }
#include <bits/stdc++.h> using namespace std; int c; int main() { double m, n, k; cin >> m >> n >> k; double y; if (n / m < k / 100) { y = m * k / 100 - n; cout << ceil(y); } else cout << 0; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; double per, res; scanf("%d%d%d", &n, &x, &y); per = ((x / double(n)) * 100); if (per >= y) { cout << 0 << "\n"; return 0; } per = y - per; res = (per / 100) * n; cout << ceil(res); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double citizens = 0; double wizards = 0; double percentage = 0; double clones = 0; cin >> citizens >> wizards >> percentage; double current = wizards / citizens * 100; if (current < percentage) { double needed = (percentage - current) / 100; clones = citizens * needed; } cout << (int)(ceil(clones)); }
#include <bits/stdc++.h> using namespace std; int main() { double a, b, c; cin >> a >> b >> c; cout << max(0, int(ceil(a * c / 100) - b)) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { long long n, x, y; cin >> n >> x >> y; cout << max(0LL, ((n * y + 99) / 100 - x)); }
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c, x; cin >> a >> b >> c; if (a * c % 100 == 0) x = (a * c) / 100; else x = (a * c) / 100 + 1; if (x < b) cout << "0" << endl; else cout << x - b << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.precision(1); cout << fixed; double n, x, y; cin >> n >> x >> y; double s = (y * n) / 100; int p = ceil(s) - x; if (p >= 0) cout << p; else cout << 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); double n, x, y; cin >> n >> x >> y; double needed = ceil(y / 100 * n); if (needed <= x) { cout << 0; } else { cout << needed - x; } }
#include <bits/stdc++.h> using namespace std; int main(int qtd, char* nome[]) { ios::sync_with_stdio(false); cin.tie(0); int n, x, y; cin >> n >> x >> y; int people = ceil(n * y / 100.0); cout << (x >= people ? 0 : people - x) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; scanf("%d%d%d", &n, &x, &y); int t = x; while (((double)x / n) * 100 < y) { x++; } cout << x - t << endl; return 0; }
#include <bits/stdc++.h> using namespace std; signed main() { long long n, x, y; cin >> n >> x >> y; long long per = x * 100 / n; long long cnt = x; while (per < y) { cnt++; per = cnt * 100 / n; } cout << cnt - x; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int sum = n * y; if (sum % 100 == 0) { sum = sum / 100; } else { sum = sum / 100; sum++; } if (sum > x) cout << sum - x << endl; else { cout << 0 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int n, x, y; int bin_search(int l, int r) { while (l != r) { int now = (l + r) / 2; if ((x + now) * 100 / n < y) l = now + 1; else r = now; } return l; } int main() { cin >> n >> x >> y; cout << bin_search(0, n * 100); }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, j, k, l; cin >> n >> x >> y; l = n * y / 100; if (l * 100 < n * y) l++; k = l - x; if (k > 0) cout << k << endl; else cout << 0 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; long long per = n * y; if (((x * 100) / n) >= y) { cout << 0; } else { if (per % 100 == 0) per = per / 100; else per = per / 100 + 1; cout << abs(x - per); } }
#include <bits/stdc++.h> int main() { int n, x, y; int s = 0, m = 0; scanf("%i %i %i", &n, &x, &y); if ((n * y) % 100 != 0) { s = ((n * y) / 100) + 1; } else { s = ((n * y) / 100); } if (s - x < 0) { printf("0"); return 0; } printf("%i", s - x); return 0; }
#include <bits/stdc++.h> using namespace std; const int OO = (int)2e9; const double PI = 2 * acos(0.0); const double EPS = 1e-9; int dcmp(double a, double b) { return fabs(a - b) <= EPS ? 0 : a > b ? 1 : 2; } int DI[] = {-1, 0, 1, 0, 1, -1, -1, 1}; int DJ[] = {0, 1, 0, -1, 1, -1, 1, -1}; int main() { long long n, m, y; cin >> n >> m >> y; long long need = ceil((double)(y * n) / 100.0); if (m > need) cout << 0 << endl; else cout << need - m << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, k; cin >> n >> x >> y; k = (n * y) / 100 - x; while ((x + k) * 100 < y * n) k++; cout << max(k, 0); return 0; }
#include <bits/stdc++.h> int main() { int i, n, x, y; scanf("%d%d%d", &n, &x, &y); i = (y * n) / 100; if (i >= x) { if (y * n > i * 100) { i++; printf("%d\n", i - x); } else printf("%d\n", i - x); } else printf("0\n"); scanf("%d", &i); return 0; }
#include <bits/stdc++.h> using namespace std; int n, x, y, q; int main() { cin >> n >> x >> y; if (y * n % 100) q = y * n / 100 + 1; else q = y * n / 100; if (q > x) cout << q - x; else cout << 0; return 0; }
#include <bits/stdc++.h> using namespace std; double a, y, b, x, c; int main() { cin >> a >> b >> c; x = a * (c / 100); if (x > b) cout << ceil(x) - b; else cout << '0'; return 0; }
#include <bits/stdc++.h> using namespace std; void solve() { long long int a, b, c; cin >> a >> b >> c; long long int x = ceil(a * c * 1.0 / 100); x -= b; if (x < 0) x = 0; cout << x << endl; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); ; long long int t; solve(); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int t; t = 1; while (t--) { double n, x, y, k; cin >> n >> x >> y; k = ceil((y / 100) * n) - x; if (k >= 0) cout << k; else cout << 0; } cerr << "Time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; const double PI = acos(-1.0); int main() { int n, x, y; scanf(" %d %d %d", &n, &x, &y); int minimum_necessary = (n * y) / 100; if ((n * y) % 100) minimum_necessary++; int ans = minimum_necessary - x; printf("%d\n", ans < 0 ? 0 : ans); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; double i = (double)(y * n) / (100); int t = int(ceil(i)) - x; if (t > 0) cout << t; else cout << 0; return 0; }
#include <bits/stdc++.h> using namespace std; struct s1 { int a; int b; }; bool cp(s1 a2, s1 b2) { if (a2.a != b2.a) return a2.a > b2.a; else return a2.b < b2.b; } int main() { float n, x, y, i, buf = 0; float f, d; cin >> n >> x >> y; f = n * y / 100; if (f == int(f)) d = int(f); else d = int(f) + 1; d = d - x; if (d < 0) cout << 0; else cout << d; return 0; }
#include <bits/stdc++.h> using namespace std; double x, y, n, z, t; int main() { cin >> n >> x >> y; z = x; t = (x / n) * 100; while (t < y) { x++; t = (x / n) * 100; } cout << x - z << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, need4demon, puppets; cin >> n >> x >> y; need4demon = ceil((y / 100.0) * n); if (x >= need4demon) puppets = 0; else puppets = need4demon - x; cout << puppets << endl; }
#include <bits/stdc++.h> const long long INF = 1000000007; const double cp = 2 * asin(1.0); const double eps = 1e-9; const long long mod = 1000000007; using namespace std; int main() { cin.tie(NULL); ios_base::sync_with_stdio(false); int n, x; double y, P; scanf("%d %d %lf", &n, &x, &P); int ans = max(0, (int)(ceil(P / 100.0 * (double)n) + 0.005) - x); printf("%d\n", ans); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d = 0; cin >> a >> b >> c; if ((c * a) % 100 != 0) { d = ((c * a) / 100) + 1; } else if ((c * a) % 100 == 0) { d = ((c * a) / 100); } if (d < b) cout << 0 << endl; else { cout << d - b << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { long int n = 0, k = 0, x = 0, y = 0, t = 0; cin >> n >> x >> y; t = (n * y + 100 - 1) / 100; k = t - x; if (k > 0) { cout << k << "\n"; } else { cout << "0\n"; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n, x, y; cin >> n >> x >> y; long long int z = 0.01 * y * n; if ((y * n) % 100 != 0) z += 1; if (x >= z) { cout << 0; return 0; } cout << z - x; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double n, x, y; cin >> n >> x >> y; if (ceil((n * y) / 100) <= x) cout << "0"; else { cout << ceil((n * y) / 100) - x; } }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int people = n - x; int wizards = x; people *= 100; wizards *= 100; int needed = max(0, n * y - wizards); cout << (needed + 99) / 100 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, r; cin >> n >> x >> y; r = (n * y + 99) / 100; cout << max(0, r - x) << endl; }
#include <bits/stdc++.h> int main() { int n, x, y, a; double m; scanf("%d%d%d", &n, &x, &y); m = (double)y / 100 * n; a = ceil(m - x); if (a >= 0) printf("%d", a); else printf("0"); return 0; }
#include <bits/stdc++.h> using namespace std; int n, x, y; int main() { scanf("%d%d%d", &n, &x, &y); int need = (n * y / 100) + ((n * y) % 100 == 0 ? 0 : 1); if (need <= x) puts("0"); else printf("%d\n", need - x); return 0; }
#include <bits/stdc++.h> using namespace std; const int oo = 1e9; const int MAXN = 1e2; int main() { ios::sync_with_stdio(0); int n, x, y; scanf("%d %d %d", &n, &x, &y); printf("%d", max(0, int(ceil(double(n) * y / 100)) - x)); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; scanf("%d %d %d", &n, &x, &y); int z = (y * n) / 100; if ((double)z < (y / 100.0) * n) { z = z + 1; } int p = 0; while (x + p < z) { p++; } cout << p << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int num1 = n * y / 100; double num2 = n * y / 100.00; if (num2 > num1) num1++; if (num1 > x) cout << abs(num1 - x) << endl; else cout << 0 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; void solve() { long double n, x; long double y; cin >> n >> x >> y; long long int req = 0; if (((n * y) / 100 - (int)(n * y) / 100) == 0) { req = (n * y) / 100; } else { req = (n * y) / 100; req += 1; } if (x >= req) cout << 0; else cout << req - x; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long TESTS = 1; while (TESTS--) { solve(); } return 0; }
#include <bits/stdc++.h> using namespace std; void fast() { std::ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); } long long arr1[1000000], arr2[1000000]; string ConverToString(long long n) { string Result; stringstream convert; convert << n; Result = convert.str(); return Result; } long long ConvertToInt(string s) { stringstream geek(s); long long x = 0; geek >> x; return x; } int main() { fast(); int a, b, c, k = 0; cin >> a >> b >> c; int ans = a * c; if (ans % 100 != 0) { k++; } ans = ans / 100; ans = ans - b; ans = ans + k; if ((a * c / 100) - b < 0) ans = 0; cout << ans << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; double N; int X; int main() { cin >> N >> X; double K; cin >> K; int goal = ceil(N * K / 100.0); cout << max(goal - X, 0); }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; double tmp = ((double)n * 1.000 * y * 0.01); int r = ceil(tmp); if (r <= x) { cout << "0\n"; } else { cout << (r - x) << endl; } }
#include <bits/stdc++.h> using namespace std; template <class T1> inline void debug(T1 _x) { cout << _x << '\n'; } template <class T1, class T2> inline void debug(T1 _x, T2 _y) { cout << _x << ' ' << _y << '\n'; } template <class T1, class T2, class T3> inline void debug(T1 _x, T2 _y, T3 _z) { cout << _x << ' ' << _y << ' ' << _z << '\n'; } template <class T1, class T2, class T3, class T4> inline void debug(T1 _x, T2 _y, T3 _z, T4 _zz) { cout << _x << ' ' << _y << ' ' << _z << ' ' << _zz << '\n'; } template <class T1> inline void debug(T1 _array, int _size) { cout << "["; for (int i = 0; i < _size; ++i) { cout << ' ' << _array[i]; } puts(" ]"); } inline bool CI(int &_x) { return scanf("%d", &_x) == 1; } inline bool CI(int &_x, int &_y) { return CI(_x) && CI(_y); } inline bool CI(int &_x, int &_y, int &_z) { return CI(_x) && CI(_y) && CI(_z); } inline bool CI(int &_x, int &_y, int &_z, int &_zz) { return CI(_x) && CI(_y) && CI(_z) && CI(_zz); } inline void wait(double seconds) { double endtime = clock() + (seconds * CLOCKS_PER_SEC); while (clock() < endtime) { ; } } const double eps = 1e-9; int n, x, y; inline void Read() { CI(n, x, y); } inline string toS(double var) { char _buff[50]; sprintf(_buff, "%.9lf", var); return (string)_buff; } inline void Proc() { long long xtra; for (xtra = 0;; ++xtra) { long long tmp = (xtra + x) * 100.; if (tmp >= ((long long)(y)*n)) break; } cout << xtra; puts(""); } int main() { int tt = 1; for (int i = 1, j1 = tt + 1; i < j1; ++i) { Read(); Proc(); } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int i, j, m, n, k, x, y; double per; cin >> n >> x >> y; for (i = 0;; i++) { if (floor(100 * ((double)(x + i) / n)) >= y) { cout << i; break; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, i, j; cin >> n >> x >> y; i = (n * y) / 100; if (y * n != i * 100) i += 1; if (i > x) cout << i - x; else cout << "0"; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); double i, j, k; cin >> i >> j >> k; double ans = ceil((k * i) / 100); if (j >= ans) cout << 0; else cout << ans - j; return 0; }
#include <bits/stdc++.h> double n, x, y, i; int main() { scanf("%lf%lf%lf", &n, &x, &y); for (;; i += 1.0) { if ((x + i) * 100 / n >= y) { printf("%.0lf", i); break; } } scanf(" "); }
#include <bits/stdc++.h> using namespace std; int main() { int atleast, required; int n, x, y; cin >> n >> x >> y; if (x > (n * y) / 100) required = 0; else { required = (n * y) / 100 - x; if (((n * y) % 100) > 0) required++; } cout << required; }
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int porcentaje = ((n * y) + 99) / 100; cout << max(0, porcentaje - x) << '\n'; }
#include <bits/stdc++.h> using namespace std; int main() { double A, B, C; double D; cin >> A >> B >> C; double x1, x2; if (!A) { if (!B) { if (!C) { printf("-1"); return 0; } else { printf("0"); return 0; } } else { printf("1\n"); printf("%lf", -C / B); } } else { D = pow(B, 2) - (4 * A * C); if (D < 0) { printf("0"); return 0; } else { D = sqrt(D); } x1 = (-B + D) / (2 * A); x2 = (-B - D) / (2 * A); if (x1 == x2) { cout << "1" << endl; printf("%lf", x1); } else { (x1 > x2) ? printf("2\n%lf\n%lf", x2, x1) : printf("2\n%lf\n%lf", x1, x2); } } }
#include <bits/stdc++.h> using namespace std; int main() { double A, B, C; cin >> A >> B >> C; if (A == 0 && B == 0 && C == 0) { cout << "-1"; return 0; } if (A == 0 && B == 0 && C != 0) { cout << "0"; return 0; } if (A == 0) { double z = (-C) / B; printf("1\n%.10lf", z); return 0; } else { double der = (B * B - 4 * A * C); if (der < 0) { cout << 0; return 0; } if (der == 0) { printf("1\n%.10lf", (-B) / (2 * A)); } if (der > 0) { double x1 = (-B + sqrt(der)) / (2 * A), x2 = (-B - sqrt(der)) / (2 * A); double q = min(x1, x2), p = max(x1, x2); printf("2\n%.10lf\n%.10lf", q, p); } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a == 0) { if (b == 0 && c != 0) cout << 0 << endl; if (b == 0 && c == 0) cout << -1 << endl; if (b != 0 && c == 0) cout << 1 << endl << "0,0000000000" << endl; if (b != 0 && c != 0) { cout << 1 << endl; double x = (double)-c / b; printf("%3.10lf\n", x); } } else { double x, y; if (b * b - 4 * a * c < 0) cout << 0 << endl; if (b * b == 4 * a * c) { cout << 1 << endl; x = (double)-b / (2 * a); printf("%3.10lf\n", x); } if (b * b - 4 * a * c > 0) { cout << 2 << endl; long double disc = sqrt(pow(b, 2) - (4 * a * c)); x = (double)(-b + disc) / (2 * a); y = (double)(-b - disc) / (2 * a); if (x < y) { printf("%3.10lf\n", x); printf("%3.10lf \n", y); } if (y < x) { printf("%3.10lf\n", y); printf("%3.10lf\n", x); } } } return 0; }
#include <bits/stdc++.h> int Delta(long a, long b, long c) { double delta; delta = (double)(b * b - 4 * a * c); if (delta > 0) return 2; else if (delta < 0) return 0; else return 1; } int main() { long a, b, c; double x1 = 0, x2 = 0, d, k, n = 0; scanf("%d%d%d", &a, &b, &c); d = (double)b * b - 4 * a * c; k = sqrt(d); x1 = (double)(-b - k) / (2 * a); x2 = (double)(-b + k) / (2 * a); if (Delta(a, b, c) == 2) { if (a != 0) { printf("%d\n", 2); if (x1 < x2) { printf("%.10f\n", (double)x1); printf("%.10f\n", (double)x2); } else { printf("%.10f\n", (double)x2); printf("%.10f\n", (double)x1); } } else if (a == 0) { printf("%d\n", 1); printf("%.10f\n", (double)-c / b); } } else if (Delta(a, b, c) == 1) { if (a != 0 && b != 0 && c != 0) { printf("%d\n", 1); printf("%.10f\n", (double)-b / (2 * a)); } else if (a == 0 && b == 0 && c == 0) printf("%d\n", -1); else if (a != 0 && b == 0 && c == 0) { printf("%d\n", 1); printf("%.10f\n", 0); } else printf("%d\n", 0); } else printf("%d\n", 0); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long delta, a, b, c; cin >> a >> b >> c; delta = b * b - 4 * a * c; if ((a == 0) && (b == 0) && (c == 0)) { cout << -1 << endl; } else if ((a == 0) && (b == 0) && (c != 0)) { cout << 0 << endl; } else if ((a == 0) && (b != 0)) { cout << 1 << endl; cout << fixed << setprecision(10); cout << -c / (b * 1.0) << endl; } else if (delta > 0) { cout << 2 << endl; cout << fixed << setprecision(10); if (a > 0) { cout << (-b - sqrt(delta)) / (2 * a * 1.0) << endl; cout << (-b + sqrt(delta)) / (2 * a * 1.0) << endl; } else { cout << (-b + sqrt(delta)) / (2 * a * 1.0) << endl; cout << (-b - sqrt(delta)) / (2 * a * 1.0) << endl; } } else if (delta == 0) { cout << 1 << endl; cout << fixed << setprecision(10); cout << -b / (2 * a * 1.0) << endl; } else { cout << 0 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int i, j, k; double a, b, c, t, x1, x2; scanf("%lf%lf%lf", &a, &b, &c); t = b * b - a * c * 4; if (a == 0 && b == 0 && c == 0) { printf("-1\n"); return 0; } if (a == 0) { if (b == 0) { printf("0\n"); return 0; } else { b = c * (-1) / b; printf("1\n%.9lf\n", b); return 0; } } if (t < 0) { printf("0\n"); return 0; } if (t == 0) { printf("1\n"); x1 = b * (-1.0) / (a * 2.0); printf("%.9lf\n", x1); } else { printf("2\n"); x1 = (b * (-1.0) - sqrt(t)) / (a * 2.0); x2 = (b * (-1.0) + sqrt(t)) / (a * 2.0); t = min(x1, x2); x2 = max(x1, x2); x1 = t; printf("%.9lf\n%.9lf\n", x1, x2); } return 0; }