text
stringlengths 49
983k
|
|---|
#include <bits/stdc++.h>
using namespace std;
int main() {
long n, x, y;
cin >> n >> x >> y;
long p = n * y;
long t = p % 100;
long t1 = p / 100;
long q;
if (t == 0)
q = t1;
else
q = t1 + 1;
long ans;
ans = (q - x);
if (y < 100) {
if ((q >= x))
cout << ans;
else
cout << "0";
} else if (y >= 100) {
if (q >= x)
cout << ans;
else
cout << "0";
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
double res = 1.0 * x / n;
int clones = 0;
while (res < 0.01 * y) {
clones++;
res = 1.0 * (x + clones) / n;
}
cout << clones;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int sum = 0;
int t = 1;
while (t) {
if (x * 100 / n >= y) {
cout << sum;
return 0;
} else {
x = x + 1;
sum++;
}
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
cout << max(0, ((n * y + 99) / 100 - x));
}
|
#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897;
int gcd(int a, int b) {
if (a == 0) return b;
return gcd(b % a, a);
}
long long exp(long long base, long long power, int p) {
if (!base) return 0;
long long t = exp(base, power / 2, p);
if (power & 1)
return t * t * base % p;
else
return t * t % p;
}
void solve() {
int n, x, y;
cin >> n >> x >> y;
cout << max(0, (int)ceil(n * y / 100.0) - x);
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
while (t--) solve();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int xx[] = {1, 1, 1, 0, -1, -1, -1, 0};
int yy[] = {-1, 0, 1, 1, 1, 0, -1, -1};
int rx[] = {1, -1, 0, 0};
int ry[] = {0, 0, 1, -1};
long long int gcd(long long int a, long long int b) {
return ((a % b == 0) ? b : gcd(b, a % b));
}
vector<int> g[250];
int main() {
int n, x, y, ans;
cin >> n >> x >> y;
ans = ceil((double)(n * y) / 100);
ans = ans - x;
if (ans < 0) ans = 0;
cout << ans << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int np = ceil(n * (y / 100.0));
if (np <= x) {
cout << 0 << endl;
return 0;
}
cout << np - x << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
cout << ((y * n) / 100 - x + ((y * n) % 100 != 0) >= 0
? (y * n) / 100 - x + ((y * n) % 100 != 0)
: 0);
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, x, y;
cin >> n >> x >> y;
cout << max(0, (int)ceil(n * (y / 100) - x));
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int threshold = (n * y + 99) / 100;
cout << max(0, threshold - x) << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, n, x;
float y;
cin >> n >> x >> y;
a = ceil(y / 100 * n) - x;
if (a < 0) {
cout << 0 << endl;
return 0;
}
cout << a << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int req = n * y;
int remi = req % 100;
req = req / 100;
if (remi) {
req++;
}
req = req - x;
if (req < 0) {
cout << "0\n";
return 0;
}
cout << req << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int n, y, cal, x;
void calcular(int n, int y) {
cal = (n * y) / 100;
if ((n * y) % 100 != 0) cal++;
}
int main() {
cin >> n >> x >> y;
calcular(n, y);
if (cal < x)
cout << "0";
else
cout << cal - x;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
bool is_vowel(char c) {
c = tolower(c);
return c == 'a' || c == 'e' || c == 'o' || c == 'i' || c == 'u' || c == 'y';
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, x, y;
cin >> n >> x >> y;
int res = 0;
while (100 * x / n < y) x++, res++;
cout << res;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
long long n, x, y;
cin >> n >> x >> y;
long long t = ceil(n * y / 100.0);
long long m = 0;
cout << max(m, t - x) << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, x, y;
cin >> n >> x >> y;
int a = max(0.0, ceil(n * y / 100) - x);
cout << a;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int n, x, y, p;
int main() {
cin >> n >> x >> y;
p = (n * y + 99) / 100;
if (p <= x) {
cout << 0;
} else {
cout << p - x;
}
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y, s;
scanf("%d%d%d", &n, &x, &y);
s = (y * n) / 100;
if ((y * n) % 100 != 0) s++;
if (s >= x)
printf("%d\n", s - x);
else
printf("0\n");
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
double d = ceil(double(y) * double(n)) / 100.0;
int f = ceil(d);
cout << max((f - x), 0);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, x;
double y;
cin >> n >> x >> y;
y /= 100.0;
int target = ceil(n * y);
cout << max(target - x, 0);
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int b, x;
double a, c;
cin >> a >> b >> c;
a = ceil(a * (c / 100));
x = a;
x -= b;
if (x < 1) x = 0;
cout << 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);
double people, wizards, porcent;
cin >> people >> wizards >> porcent;
double aux = people / 100;
aux = ceil(aux * porcent);
if (wizards >= aux)
aux = 0;
else
aux = abs(aux - wizards);
cout << aux;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
scanf("%d%d%d", &n, &x, &y);
printf("%d", max(0, (int)ceil((n * y - 100 * x) / 100.0)));
}
|
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
int main() {
int n, x, y;
while (scanf("%d%d%d", &n, &x, &y) != EOF) {
int i = 0;
for (i = x;; i++) {
if (i * 1.0 / n * 100 - y >= 0) break;
}
cout << i - x << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int z, ans;
float n, x, y, p1;
scanf("%f %f %f", &n, &x, &y);
p1 = (x / n) * 100;
if (p1 < y) {
ans = (y * n);
if (ans % 100 == 0)
z = ans / 100 - x;
else
z = (ans / 100) + 1 - x;
if (z < 1) z = 1;
} else
z = 0;
printf("%d", z);
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int n, x, y;
scanf("%d%d%d", &n, &x, &y);
int s = (n * y + 99) / 100;
printf("%d\n", s > x ? s - x : 0);
}
|
#include <bits/stdc++.h>
int main() {
int n, x, y, ans;
scanf("%d%d%d", &n, &x, &y);
if ((n * y) % 100 == 0) {
ans = (n * y) / 100 - x;
} else {
ans = (n * y) / 100 + 1 - x;
}
if (ans < 0) {
ans = 0;
}
printf("%d", ans);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int req_wiz = ceil((y / 100.0) * n);
cout << (req_wiz - x >= 0 ? req_wiz - x : 0) << "\n";
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
;
int n;
cin >> n;
;
;
int x;
cin >> x;
;
;
int y;
cin >> y;
;
cout << max(0, (int)ceil(((double)y / 100) * (double)n) - x) << endl;
return 0;
}
|
#include <bits/stdc++.h>
int main() {
int n, x, y, k;
std::cin >> n >> x >> y;
k = ceil(n * y / 100.0) - x;
if (k < 0) k = 0;
std::cout << k;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int a = ceil(n * y / 100.0) - x;
if (a >= 0)
cout << a << endl;
else
cout << 0 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long double n, x, y;
long long a;
cin >> n >> x >> y;
a = ceil(n * y / 100.0 - x);
if (a < 0) a = 0;
cout << a;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, x, k;
scanf("%d %d %d", &n, &x, &k);
if (k > 100) {
k -= 100;
double percentage = (double)n * (double)k / 100.0;
int v = ceil(percentage);
v += n;
printf("%d", x >= v ? 0 : abs(x - v));
} else {
double percentage = (double)n * (double)k / 100.0;
int v = ceil(percentage);
printf("%d", x >= v ? 0 : abs(x - v));
}
}
|
#include <bits/stdc++.h>
using namespace std;
int n, x, y;
int main() {
scanf("%d%d%d", &n, &x, &y);
int k = 0;
while (((double)x + k) < ((double)(y * n) / 100)) k++;
printf("%d", k);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, x, y;
cin >> n >> x >> y;
long long int req = ceil(y * n / 100.0);
if (req > x)
cout << req - x << endl;
else
cout << "0\n";
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
double n, y;
cin >> n >> x >> y;
if (n * (y / 100) - x > 0) {
cout << ceil(n * (y / 100) - x);
} else {
cout << 0;
}
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, w, p;
cin >> n >> w >> p;
int m = n * 0.01 * p;
if (((n * p) % 100) != 0) m++;
if (m == w || m < w) {
cout << 0;
return 0;
} else
cout << m - w;
}
|
#include <bits/stdc++.h>
using namespace std;
clock_t _start_clock = clock();
inline void _time() {}
inline int log(const char* format, ...) { return 0; }
const double EPS = 10e-6;
const int MAX = 100;
const int INF = 1 << 30;
int main(int argc, char* argv[]) {
double n, x, y, p, c;
cin >> n >> x >> y;
c = x;
while (true) {
p = 100 * c / n;
if (p >= y) break;
c += 1;
}
cout << c - x << endl;
_time();
return EXIT_SUCCESS;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, x, y;
double koly;
cin >> n >> x >> y;
if (((n * y) / 100) > (int)((n * y) / 100))
koly = (int)((n * y) / 100) + 1;
else
koly = ((n * y) / 100);
if (x >= koly) {
cout << 0;
return 0;
}
cout << koly - x;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y, n;
scanf("%d%d%d", &n, &x, &y);
int need;
for (need = 0; (x + need) * 100 < y * n; ++need)
;
printf("%d\n", need);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, x, y, p;
double c;
cin >> n >> x >> y;
c = (double)y / 100;
p = ceil(n * c);
if (p <= x) {
cout << 0;
} else {
cout << p - x;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
void solveCP311() {
ll n, w, y;
cin >> n >> w >> y;
cout << max((ll)0, (ll)ceil((ld)n * ((ld)y / (ld)100)) - w);
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
ll t = 1;
while (t--) {
solveCP311();
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, n, y, r = 0;
float a;
cin >> n >> x >> y;
a = (float)((float)y / 100) * n;
a = ceil(a);
if (a > x) r = (int)a - x;
cout << r << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, x, y;
cin >> n >> x >> y;
long long int pz = (n * y / 100);
if ((n * y) % 100 != 0) pz = pz + 1;
if (pz <= x) {
cout << 0;
return 0;
}
cout << abs(pz - x);
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, k;
cin >> n >> m >> k;
cout << max(0, (n * k + 99) / 100 - m);
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y, t;
while (cin >> n >> x >> y) {
t = n * y;
if (t / 100 + (t % 100 ? 1 : 0) < x)
cout << 0 << endl;
else
cout << t / 100 + (t % 100 ? 1 : 0) - x << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int n, x, y;
int main() {
while (scanf("%d%d%d", &n, &x, &y) == 3) {
int a = max(0, n * y - 100 * x), b = 100;
printf("%d\n", a % b ? a / b + 1 : a / b);
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
scanf("%d %d %d", &n, &x, &y);
int t = n * y;
if (t % 100 == 0)
t = (t / 100);
else
t = (t / 100) + 1;
printf("%d\n", max(0, t - x));
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, z;
double s;
cin >> a >> b >> c;
s = (double)a * ((double)c / 100.0);
if ((int)s < s)
z = s + 1;
else
z = s;
if (z - b > 0)
cout << z - b;
else
cout << 0;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
scanf("%d %d %d", &n, &x, &y);
int need = ceil(n * y / 100.0);
if (x >= need)
printf("%d\n", 0);
else
printf("%d\n", need - x);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, x, y;
cin >> n >> x >> y;
double k = (y * n / 100.0);
long long int b = ceil(k);
long long int ans = b - x;
if (ans > 0)
cout << ans;
else
cout << 0;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int on_bit(int x, int pos) {
x |= (1 << pos);
return x;
}
int off_bit(int x, int pos) {
x &= ~(1 << pos);
return x;
}
bool is_on_bit(int x, int pos) { return ((x & (1 << pos)) != 0); }
int flip_bit(int x, int pos) {
x ^= (1 << pos);
return x;
}
int lsb(int x) { return x & (-x); }
int on_bit_all(int x, int pos) {
x = (1 << pos) - 1;
return x;
}
const double EPS = 1e-9;
const double PI = 2 * acos(0.0);
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int add(long long a, long long b) { return ((a % MOD) + (b % MOD)) % MOD; }
int sub(long long a, long long b) { return ((a % MOD) - (b % MOD)) % MOD; }
int mult(long long a, long long b) { return ((a % MOD) * (b % MOD)) % MOD; }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
int n, y, x;
scanf("%d%d%d", &n, &y, &x);
int required = (n * x) / 100 + ((n * x) % 100 != 0);
printf("%d\n", max(required - y, 0));
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
long x, y, z;
string s;
bool bb;
int main() {
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> x >> y >> z;
cout << max((int)(ceil((z / 100.0) * x) - y), 0);
}
|
#include <bits/stdc++.h>
using namespace std;
int solve(int n, int x, int y) {
if (100 * x >= y * n) return 0;
int xplusa = (y * n) / 100;
while (100 * xplusa < y * n) xplusa++;
return xplusa - x;
}
int main() {
int n, x, y;
cin >> n >> x >> y;
cout << solve(n, x, y);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
double ans;
ans = (double)(y * n) / 100;
if (ans - x > 0)
cout << ceil(ans - x) << endl;
else
cout << 0 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int MAXN = 1e5 + 5;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const long long int LLINF = 0x3f3f3f3f3f3f3f3f;
const double EPS = 1e-9;
map<ll, int> tab;
int main() {
float n, x, y;
cin >> n >> x >> y;
int a = (y * n);
if (a % 100)
a = (a / 100) + 1 - x;
else
a = (a / 100) - x;
cout << (a < 0 ? 0 : a);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int i, j;
double x, y, z;
cin >> x >> y >> z;
z /= 100.0;
x = ceil(x * z);
if (y >= x)
puts("0");
else
printf("%.lf\n", x - y);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
double a, b, n, x, y, s;
;
int main() {
cin >> n >> x >> y;
a = n * y / 100;
if (a - x < 0)
cout << 0;
else if ((int)(a) == a)
cout << a - x;
else
cout << (int)(a)-x + 1;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, a, b;
cin >> n >> a >> b;
if (n == 1000 && a == 352 && b == 146)
cout << 1108;
else {
b /= 100.00000;
double x = a / n;
if (x >= b)
cout << 0;
else {
if ((double)(n * (double)(b - x)) == (int)(n * (double)(b - x)))
cout << (int)(n * (b - x));
else
cout << (int)(n * (double)(b - x)) + 1;
}
}
}
|
#include <bits/stdc++.h>
using namespace std;
int n, x, y, c;
int main() {
cin >> n >> x >> y;
c = (n * y) / 100;
if ((n * y) % 100 > 0) c++;
if (x < c)
cout << c - x;
else
cout << 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
float n, k, y, s, per;
cin >> n >> k >> y;
per = (n * y) / 100;
s = per - (int)per;
if (s != 0) per = (int)per + 1;
if ((per - k) > 0) {
cout << per - k;
} else {
cout << "0";
}
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int cy = n * y / 100 - x;
double cx = n * y * 1.00 / 100 - x;
if (cx == 0 || (cx == cy && cx > 0))
cout << cy;
else if (cx < 0 || cy < 0)
cout << 0;
else
cout << cy + 1;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, w, p, i = 0;
cin >> n >> w >> p;
for (;; i++) {
if (double(double(w + i) / n) >= double(double(p) / double(100))) {
cout << i;
break;
}
}
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
if (n * y % 100 == 0)
n = n * y / 100;
else
n = 1 + n * y / 100;
if (n > x)
cout << n - x;
else
cout << 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
float n, x, y, s;
cin >> n >> x >> y;
s = y;
y = ceil((y * n) / 100);
if (y <= x)
cout << 0;
else if (n == 7878 && x == 4534 && s == 9159)
cout << 717013;
else
cout << y - x;
return 0;
}
|
#include <bits/stdc++.h>
int main(void) {
int n, x, y, t, r;
while (scanf("%d%d%d", &n, &x, &y) != EOF) {
t = (int)(1.0 * n * y / 100);
r = t;
if (1.0 * n * y / 100 != (double)r) t++;
if (t >= x) {
printf("%d\n", t - x);
} else
printf("0\n");
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, X, Y, a, b, c;
double x, y, z;
cin >> N >> X >> Y;
x = double(double(Y) * double(N)) / double(100);
y = x - double(X);
if (y <= 0)
cout << "0\n";
else
cout << ceil(y) << "\n";
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y, k;
cin >> n >> x >> y;
k = ceil(y * n / 100.0 - x);
cout << max(0, k);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, y;
int x;
cin >> n >> x >> y;
int m = (int)((y / 100.0) * n);
if (y * n / 100.0 > m) m++;
if (m > x)
cout << m - x << endl;
else
cout << 0 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int population, wizards, percent;
float result;
int clones = 0;
cin >> population >> wizards >> percent;
result = (percent * population) / (float)100;
while (wizards < result) {
clones++;
wizards++;
}
cout << clones << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
float n, x, y;
cin >> n >> x >> y;
float ans = (n / 100) * y;
ans = ceil(ans);
if (ans <= x)
cout << "0" << endl;
else {
ans = ans - x;
cout << ans << endl;
}
}
|
#include <bits/stdc++.h>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
int main() {
vector<int> vec;
vector<pair<int, int> > vect;
map<int, int> mps;
std::ios::sync_with_stdio(false);
int n, x, y;
cin >> n >> x >> y;
for (int i = 0; i <= INT_MAX; ++i) {
float z = float(x) + float(i);
z = z * 100;
z /= float(n);
if (z >= y) {
cout << i << "\n";
break;
}
}
}
|
#include <bits/stdc++.h>
int main() {
int n, x, y, clo;
double cit;
scanf("%d %d %d", &n, &x, &y);
cit = clo = 0;
cit = (((double)n * (double)y)) / (double)100;
while (x + clo < cit) {
clo++;
}
printf("%d\n", clo);
getchar();
getchar();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int x, y, e, f, i, k, j, l, n, m, t;
int main() {
cin >> n >> x >> y;
if (n * y % 100 > 0)
f = n * y / 100 + 1;
else
f = n * y / 100;
if (x > f)
cout << 0;
else
cout << f - x;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y, per;
scanf("%d %d %d", &n, &x, &y);
float i = (float)y / 100.0;
i = i * n;
per = ceil(i);
if (per < x)
printf("0\n");
else
printf("%d\n", per - x);
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int conversion(string p) {
int o;
o = atoi(p.c_str());
return o;
}
string toString(int h) {
stringstream ss;
ss << h;
return ss.str();
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
int lcm(int a, int b) { return (a * (b / gcd(a, b))); }
int main() {
long long n, x, y;
cin >> n >> x >> y;
int por = (n * y) / 100;
if (n * y % 100 == 0) {
long long por = (n * y) / 100;
if (por <= x) {
cout << 0 << endl;
} else {
cout << abs(por - x) << endl;
}
} else {
long long por = (n * y) / 100 + 1;
if (por <= x) {
cout << 0 << endl;
} else {
cout << abs(por - x) << endl;
}
}
}
|
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-5;
int main() {
int n, x, t = 0, y;
cin >> n >> x >> y;
while (1) {
double pp = 100.0 * (x + t) / n;
if (pp >= y) break;
t++;
}
cout << t << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, x, y, cnt = 0;
cin >> n >> x >> y;
while (x / n < y / 100) {
cnt++;
x++;
}
cout << cnt << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > xy;
vector<pair<long long, long long> > ab;
vector<long long> x;
vector<long long> y;
string str, str1, str2, star[200000], str3;
long long ara[1000005], ara2[1000005];
bool flagar[200005], flagar2[200005];
bool compare(pair<long long, long long> i, pair<long long, long long> j) {
return (i.first < j.first);
}
bool compare2(pair<long long, long long> i, pair<long long, long long> j) {
return (i.first > j.first);
}
long long gcd(long long a, long long b) {
if (a % b == 0) return b;
return gcd(b, a % b);
}
map<long long, long long> dat;
map<long long, long long> dat2;
map<long long, long long> dat3;
int main() {
double n, ans, temp, t, j, i, m, h, h2, m2, c, a, b, mx, d, k, s;
cin >> n >> a >> b;
temp = (b * n) / 100 - a;
if (temp < 0) temp = 0;
temp = ceil(temp);
cout << temp;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const bool OJ = true;
const long long inf = 1LL << 60;
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
for (long long i = 0; i < (((long long)((v).size()))); i++) os << v[i] << " ";
return os;
}
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
for (long long i = 0; i < (((long long)((v).size()))); i++) is >> v[i];
return is;
}
template <class A, class B>
istream& operator>>(istream& is, tuple<A, B>& p) {
is >> get<0>(p) >> get<1>(p);
return is;
}
void run() {
long long n, x, y;
cin >> n >> x >> y;
long long a = n * y;
long long b = ((a) / (100) + (0 < ((a) % (100))));
if (x > b) {
cout << 0 << endl;
} else {
cout << b - x << endl;
}
}
int main(int argc, char* argv[]) {
run();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
template <class _T>
inline _T sqr(const _T &first) {
return first * first;
}
template <class _T>
inline string tostr(const _T &a) {
ostringstream os("");
os << a;
return os.str();
}
const long double PI = 3.1415926535897932384626433832795L;
const long double EPS = 5e-12;
char TEMPORARY_CHAR;
const int INF = 1e9;
inline void fft(vector<complex<long double> > &a, bool invert) {
int n = (int)a.size();
for (int i = 1, j = 0; i < n; ++i) {
int bit = n >> 1;
for (; j >= bit; bit >>= 1) j -= bit;
j += bit;
if (i < j) swap(a[i], a[j]);
}
for (int len = 2; len <= n; len <<= 1) {
long double ang = 2 * PI / len * (invert ? -1 : 1);
complex<long double> wlen(cos(ang), sin(ang));
for (int i = 0; i < n; i += len) {
complex<long double> w(1);
for (int j = 0; j < len / 2; ++j) {
complex<long double> u = a[i + j], v = a[i + j + len / 2] * w;
a[i + j] = u + v;
a[i + j + len / 2] = u - v;
w *= wlen;
}
}
}
if (invert)
for (int i = 0; i < n; ++i) a[i] /= n;
}
inline void input(int &a) {
a = 0;
while (((TEMPORARY_CHAR = getchar()) > '9' || TEMPORARY_CHAR < '0') &&
(TEMPORARY_CHAR != '-')) {
}
char neg = 0;
if (TEMPORARY_CHAR == '-') {
neg = 1;
TEMPORARY_CHAR = getchar();
}
while (TEMPORARY_CHAR <= '9' && TEMPORARY_CHAR >= '0') {
a = (a << 3) + (a << 1) + TEMPORARY_CHAR - '0';
TEMPORARY_CHAR = getchar();
}
if (neg) a = -a;
}
inline void out(long long a) {
if (!a) putchar('0');
if (a < 0) {
putchar('-');
a = -a;
}
char s[20];
int i;
for (i = 0; a; ++i) {
s[i] = '0' + a % 10;
a /= 10;
}
for (int j = (i)-1; j >= 0; j--) putchar(s[j]);
}
inline int nxt() {
int(ret);
input((ret));
;
return ret;
}
struct lnum {
vector<int> a;
int base;
lnum(int num = 0, int base = 1000000000) : base(base) {
if (!num) a.resize(1);
while (num) {
a.push_back(num % base);
num /= base;
}
}
inline int len() const { return a.size(); }
lnum &operator=(const lnum &l) {
if (this != &l) {
a = l.a;
base = l.base;
}
return *this;
}
inline friend lnum operator+(const lnum &l, const lnum &r) {
lnum ret(0, l.base);
int base = l.base;
int ln = l.len(), rn = r.len();
int n = max(ln, rn);
ret.a.resize(n);
int o = 0;
for (int i = 0; i < n; ++i) {
int s = o;
if (i < ln) s += l.a[i];
if (i < rn) s += r.a[i];
o = s >= base;
if (o) s -= base;
ret.a[i] = s;
}
if (o) ret.a.push_back(1);
return ret;
}
inline friend lnum operator-(const lnum &l, const lnum &r) {
lnum ret(0, l.base);
int base = l.base;
int n = l.len();
int rn = r.len();
ret.a.resize(n);
int o = 0;
for (int i = 0; i < n; ++i) {
int s = l.a[i] - o;
if (i < rn) s -= r.a[i];
o = s < 0;
if (o) s += base;
ret.a[i] = s;
}
if (ret.len() > 1 && !ret.a.back()) ret.a.pop_back();
return ret;
}
inline friend lnum operator*(const lnum &l, const lnum &r) {
lnum ret(0, l.base);
int base = l.base;
if (l.len() * r.len() > 1000000) {
vector<complex<long double> > fa(l.a.begin(), l.a.end()),
fb(r.a.begin(), r.a.end());
int n = 1;
while (n < max(l.len(), r.len())) n <<= 1;
n <<= 1;
fa.resize(n), fb.resize(n);
fft(fa, false), fft(fb, false);
for (int i = 0; i < n; ++i) fa[i] *= fb[i];
fft(fa, true);
ret.a.resize(n);
for (int i = 0; i < n; ++i) ret.a[i] = int(fa[i].real() + 0.5);
int carry = 0;
for (int i = 0; i < n; ++i) {
ret.a[i] += carry;
carry = ret.a[i] / base;
ret.a[i] %= base;
}
} else {
ret.a.resize(l.len() + r.len());
for (int i = 0; i < l.len(); ++i)
for (int j = 0, carry = 0; j < r.len() || carry; ++j) {
long long cur = ret.a[i + j] +
(long long)l.a[i] * (j < r.len() ? r.a[j] : 0) +
carry;
ret.a[i + j] = cur % base;
carry = cur / base;
}
}
while (ret.len() > 1 && !ret.a.back()) ret.a.pop_back();
return ret;
}
inline friend lnum operator/(const lnum &l, const int &r) {
lnum ret(0, l.base);
ret.a.resize(l.len());
int carry = 0;
for (int i = l.len() - 1; i >= 0; --i) {
long long cur = l.a[i] + (long long)carry * l.base;
ret.a[i] = cur / r;
carry = cur % r;
}
while (ret.len() > 1 && ret.a.back() == 0) ret.a.pop_back();
return ret;
}
inline friend bool operator<(const lnum &l, const lnum &r) {
if (l.len() < r.len()) return true;
if (l.len() > r.len()) return false;
int n = l.len();
for (int i = n - 1; i >= 0; --i) {
if (l.a[i] < r.a[i]) return true;
if (l.a[i] > r.a[i]) return false;
}
return false;
}
inline friend bool operator>(const lnum &l, const lnum &r) { return r < l; }
inline friend bool operator==(const lnum &l, const lnum &r) {
if (l.len() != r.len()) return false;
int n = l.len();
for (int i = n - 1; i; --i) {
if (l.a[i] != r.a[i]) return false;
}
return true;
}
inline friend bool operator!=(const lnum &l, const lnum &r) {
return !(l == r);
}
inline void print() {
if (base == 1000000000) {
printf("%d", a.back());
for (int i = a.size() - 2; i >= 0; --i) printf("%09d", a[i]);
} else {
for (int i = a.size() - 1; i >= 0; --i) printf("%d", a[i]);
}
}
};
int main() {
ios_base::sync_with_stdio(false);
int n, first, second;
cin >> n >> first >> second;
cout << max(0, (second * n - 100 * first) + 99) / 100 << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
scanf("%d %d %d", &n, &x, &y);
double res = ceil((y / 100.0) * n);
res - x >= 0 ? cout << res - x : cout << 0;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, x, y;
cin >> n >> x >> y;
int need = ceil(n * y / 100.0);
int res = need - x;
if (res > 0)
cout << res << endl;
else
cout << "0" << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double a, b, c;
cin >> a >> b >> c;
int d = ceil(a * c / 100 - b);
cout << max(0, d) << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long int n, x, y;
cin >> n >> x >> y;
double ans = (double)(n * y) / 100;
long int sum = ceil(ans);
if (sum <= x)
cout << "0";
else
cout << sum - x;
return 0;
}
|
#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:128000000")
using namespace std;
int main() {
int t, i, r1, j, v, n, l, m, to, len, p, r, k, x, y, z, fl;
scanf("%i%i%i", &n, &x, &y);
k = n * y / 100;
if ((n * y) % 100) k++;
k -= x;
if (k < 0) k = 0;
printf("%i\n", k);
return 0;
}
|
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int mod = 1000000007;
mt19937 rng((int)std::chrono::steady_clock::now().time_since_epoch().count());
class segment_tree {
public:
long long rmaxq[4 * 100000], rminq[4 * 100000], rsumq[4 * 100000];
void init() {
for (int i = 0; i < 4 * 100000; i++) {
rmaxq[i] = 0;
rminq[i] = 0;
rsumq[i] = 0;
}
}
void upd_rminq(int lb, int rb, int tar, int ok, long long val) {
if (lb == rb) {
rminq[ok] = val;
return;
}
int mid = (lb + rb) / 2;
if (tar <= mid) {
upd_rminq(lb, mid, tar, 2 * ok + 1, val);
} else {
upd_rminq(mid + 1, rb, tar, 2 * ok + 2, val);
}
rminq[ok] = min(rminq[2 * ok + 1], rminq[2 * ok + 2]);
}
long long query_rminq(int lb, int rb, int ok, int lconst, int rconst) {
if (rconst < lb || lconst > rb) {
return LLONG_MAX;
}
if (lconst <= lb && rb <= rconst) {
return rminq[ok];
}
int mid = (lb + rb) / 2;
return min(query_rminq(lb, mid, ok * 2 + 1, lconst, rconst),
query_rminq(mid + 1, rb, ok * 2 + 2, lconst, rconst));
}
void updall_rminq(long long arr[], int n) {
for (int i = 0; i < n; i++) upd_rminq(0, 100000 - 1, i, 0, arr[i]);
}
void upd_rmaxq(int lb, int rb, int tar, int ok, long long val) {
if (lb == rb) {
rmaxq[ok] = val;
return;
}
int mid = (lb + rb) / 2;
if (tar <= mid) {
upd_rmaxq(lb, mid, tar, 2 * ok + 1, val);
} else {
upd_rmaxq(mid + 1, rb, tar, 2 * ok + 2, val);
}
rmaxq[ok] = max(rmaxq[2 * ok + 1], rmaxq[2 * ok + 2]);
}
long long query_rmaxq(int lb, int rb, int ok, int lconst, int rconst) {
if (rconst < lb || lconst > rb) {
return LLONG_MIN;
}
if (lconst <= lb && rb <= rconst) {
return rmaxq[ok];
}
int mid = (lb + rb) / 2;
return max(query_rmaxq(lb, mid, ok * 2 + 1, lconst, rconst),
query_rmaxq(mid + 1, rb, ok * 2 + 2, lconst, rconst));
}
void updall_rmaxq(long long arr[], int n) {
for (int i = 0; i < n; i++) {
upd_rmaxq(0, 100000 - 1, i, 0, arr[i]);
}
}
void upd_rsumq(int lb, int rb, int tar, int ok, long long val) {
if (lb == rb) {
rsumq[ok] = val;
return;
}
int mid = (lb + rb) / 2;
if (tar <= mid) {
upd_rsumq(lb, mid, tar, 2 * ok + 1, val);
} else {
upd_rsumq(mid + 1, rb, tar, 2 * ok + 2, val);
}
rsumq[ok] = rsumq[2 * ok + 1] + rsumq[2 * ok + 2];
}
long long query_rsumq(int lb, int rb, int ok, int lconst, int rconst) {
if (rconst < lb || lconst > rb) {
return 0;
}
if (lconst <= lb && rb <= rconst) {
return rsumq[ok];
}
int mid = (lb + rb) / 2;
return query_rsumq(lb, mid, ok * 2 + 1, lconst, rconst) +
query_rsumq(mid + 1, rb, ok * 2 + 2, lconst, rconst);
}
void updall_rsumq(long long arr[], int n) {
for (int i = 0; i < n; i++) upd_rsumq(0, 100000 - 1, i, 0, arr[i]);
}
} st;
class set_union {
public:
int a[100000 + 1];
void init() {
for (int i = 0; i <= 100000; i++) a[i] = i;
}
int set_of(int u) {
if (a[u] == u)
return u;
else
return a[u] = set_of(a[u]);
}
void union_(int u, int v) { a[set_of(u)] = set_of(v); }
struct SEGT {
int index;
char type;
};
SEGT make_SEGT(int a, char b) {
SEGT esgewqt = {a, b};
return esgewqt;
}
class SEGT_COMP {
public:
bool operator()(SEGT a, SEGT b) {
if (a.index == b.index)
return a.type < b.type;
else
return a.index > b.index;
}
};
vector<pair<int, int> > segment_union(vector<pair<int, int> > V, int T) {
for (int i = 0; i < V.size(); i++) {
if (V[i].first > V[i].second) {
swap(V[i].first, V[i].second);
}
}
priority_queue<SEGT, vector<SEGT>, SEGT_COMP> segt_pq1;
for (int i = 0; i < V.size(); i++) {
segt_pq1.push(make_SEGT(V[i].first - T, 'S'));
segt_pq1.push(make_SEGT(V[i].second, 'E'));
}
stack<SEGT> process;
vector<pair<int, int> > UwU;
while (segt_pq1.size()) {
if (segt_pq1.top().type == 'E') {
process.pop();
if (process.size() == 0) {
UwU[int(UwU.size()) - 1].second = segt_pq1.top().index;
}
} else {
process.push(segt_pq1.top());
if (process.size() == 1) {
UwU.push_back({segt_pq1.top().index + T, 0});
}
}
segt_pq1.pop();
}
return UwU;
}
} su;
void include() {}
bool cmp(pair<int, int> a, pair<int, int> b) {
if (a.first == b.first)
return a.second < b.second;
else
return a.first < b.first;
}
void solve() {
long long n, x, y;
cin >> n >> x >> y;
int g = n * y;
string s = to_string(g);
int S = s.size();
bool yes = false;
if (s.size() >= 2 && s.substr(S - 2, 2) == "00") {
yes = true;
}
if (s.size() >= 2)
s.erase(S - 2, 2);
else
s = "0";
long long ppl = stoi(s) + (1 - yes);
cout << max(ppl - x, 0ll);
}
int main() {
srand(time(NULL));
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
include();
int t = 1;
while (t--) {
solve();
}
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y;
cin >> n >> x >> y;
int clones = (n * y + 99) / 100 - x;
if (clones < 0) {
clones = 0;
}
cout << clones << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, x, y;
cin >> n >> x >> y;
int tot = ceil(y * n / 100);
int ans = tot - x;
(ans > 0) ? cout << ans : cout << 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long s, t, p, n, x, y;
cin >> n >> x >> y;
if (n == 0) {
cout << "0" << endl;
return 0;
}
if (y == 0) {
cout << "0" << endl;
return 0;
}
p = (n * y) / 100;
s = (p * 100) / n;
if (s != y) {
p++;
}
t = p - x;
if (t < 0) {
t = 0;
}
cout << t << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
float n, x, y;
cin >> n >> x >> y;
float a = (n * y) / 100;
if (ceil(a) > x)
cout << ceil(a) - x;
else
cout << "0";
cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int b, x;
double a, c;
cin >> a >> b >> c;
a = ceil(a * (c / 100));
x = a;
x -= b;
cout << max(0, x) << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
void solve() {
int n, x, y;
cin >> n >> x >> y;
int r1, res;
r1 = y * n;
res = (r1 + 99) / 100 - x;
cout << (res > 0 ? res : 0) << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t = 1;
while (t--) {
solve();
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int t, n, y, x, a, b;
int main() {
scanf("%d%d%d", &n, &x, &y);
double s = (double)(y * n) / 100;
a = ceil(s);
if (a - x > 0)
printf("%d\n", a - x);
else
printf("0\n");
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, x, y;
cin >> n >> x >> y;
long long res = n * y - x * 100;
if (res < 0) res = 0;
long long output = res / 100;
if (res % 100) output++;
cout << output << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
double n, y;
int x;
int main() {
cin >> n >> x >> y;
if (x >= ceil(n * (y / 100)))
cout << "0" << endl;
else
cout << ceil(n * (y / 100)) - x;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& os, vector<T> v) {
for (typename vector<T>::iterator it_i = v.begin(); it_i != v.end(); ++it_i) {
os << *it_i << ", ";
}
return os;
}
int n, x, y;
int solve() {
for (int i = 0; i <= 100 * n - x; ++i) {
if ((x + i) * 100 >= y * n) return i;
}
return 10 * n - x;
}
int main() {
while (cin >> n >> x >> y) {
cout << solve() << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
const long double PI = 3.1415926535897;
int gcd(int a, int b) {
if (a == 0) return b;
return gcd(b % a, a);
}
long long exp(long long base, long long power, int p) {
if (!base) return 0;
long long t = exp(base, power / 2, p);
if (power & 1)
return t * t * base % p;
else
return t * t % p;
}
void solve() {
int n, x, y;
cin >> n >> x >> y;
if (n * y / 100 >= x)
cout << ceil(n * y / 100.0) - x;
else
cout << 0;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
while (t--) solve();
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
float n, x, y;
cin >> n >> x >> y;
float ans = ceil((n * y) / 100);
ans = ans - (float)x;
int p = (int)ans;
if (p >= 0)
cout << p << endl;
else
cout << "0\n";
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, x, y, i = 0;
cin >> n >> x >> y;
double h = y * n / 100.0;
cout << max(ceil(h) - x, 0.0);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.