solution
stringlengths 11
983k
| difficulty
int64 0
21
| language
stringclasses 2
values |
---|---|---|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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);
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
import math
n,x,y = [int(ch) for ch in input().split(' ')]
ans = (math.ceil(y*n/100) - x)
print('0') if ans < 0 else print(ans)
| 7 |
PYTHON3
|
import math
try:
t=1
while(t):
t-=1
#s=input()
n,x,y=map(int,input().split())
#print()
print(max(math.ceil((y*n)/100)-x,0))
except:
pass
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
import math
a, b, c = map(int, input().split(' '))
print(max(math.ceil(a*c/100 - b), 0))
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
def f(l):
n,x,y = l
return max((n*y+99)//100-x,0)
l = list(map(int,input().split()))
print(f(l))
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
import math
n,x,y=map(int,input().split())
o=(n*(y/100))-x
if o<0:
print(0)
else:
print(math.ceil(o))
| 7 |
PYTHON3
|
#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;
}
}
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
n,x,y= map(int, input() .split())
number = ((y/100) * n)
needed = number - x
if needed < 0:
print('0')
elif number % 1 == 0:
print (int(needed))
else:
print(int(needed +1))
| 7 |
PYTHON3
|
import math
n,x,y=map(int,input().split())
req=math.ceil((y/100)*n)
ans=req-x if req>x else 0
print(ans)
| 7 |
PYTHON3
|
#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";
}
}
| 7 |
CPP
|
from math import ceil
[n,x,y] = list(map(int, input().split()))
print(ceil((n*y/100)-x) if x/n*100<y else 0)
| 7 |
PYTHON3
|
import math
import sys
sys.setrecursionlimit(1000)
n, x, y = map(int, input().split())
print(max(0, math.ceil(n * y / 100) - x))
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
}
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
__author__ = 'Esfandiar'
import sys
from math import ceil
input = sys.stdin.readline
n,x,y = map(int,input().split())
Person = ceil(n*(y/100))
print(max(0,Person-x))
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
a,b,c=map(int,input().split())
p=-min(0,-a*c/100+b)
print(int(p))if p==int(p) else print(int(p)+1)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
import math
def main():
n, x, y = map(int, input().split())
print(max(0, math.ceil(n / 100 * y) - x))
if __name__ == '__main__':
main()
| 7 |
PYTHON3
|
from math import *
n1=input()
a=n1.split()
n=int(a[0])
x=int(a[1])
y=int(a[2])
k=(y/100)*n
y=int(ceil(k))
if y > x:
print(y-x)
else:
print("0")
| 7 |
PYTHON3
|
from math import ceil
a=list(map(int,input().split()))
print(max(0,ceil(a[0]*a[2]/100-a[1])))
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
from math import ceil
n, x, y = (int(i) for i in input().split(' '))
z = ceil(n * y / 100)
if z > x:
print(z - x)
else:
print(0)
| 7 |
PYTHON3
|
#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;
}
}
| 7 |
CPP
|
#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;
}
}
}
| 7 |
CPP
|
n, x, y = map(int,input().split())
import math
if x >= n*y/100:
print(0)
else:
print(math.ceil(n*y/100 - x))
| 7 |
PYTHON3
|
n,x,y=map(int,input().split());print(max(0, -((100 * x - n * y) // 100)))
| 7 |
PYTHON3
|
# import sys
# sys.stdin=open("input.in",'r')
# sys.stdout=open("out1.out",'w')
import math
n,x,y=map(int,input().split())
a=(n*y-x*100)/100
print(max(0,math.ceil(a)))
| 7 |
PYTHON3
|
import math
S = input().split()
n = int(S[0])
x = int(S[1])
y = int(S[2])
needed = math.ceil(y/100*n)
if needed-x > 0:
print(needed-x)
else:
print(0)
| 7 |
PYTHON3
|
from math import ceil
n,x,y = map(int,input().split())
p = ceil((n*y)/100)
if p<x:
print(0)
else:
print(p-x)
| 7 |
PYTHON3
|
from math import ceil
#A. Wizards and Demonstration
n,x,y = map(int,input().split())
if x/n>=y/100:
print(0)
else:
b = (y/100)*n-x
print(ceil(b))
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
import math
n,w,p=list(map(int,input().split()))
m=math.ceil((n*p)/100)
if w>=m:
print("0")
else:
print(m-w)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
n, x, y = map(int, input().split())
p = n/100
ans = (y*p) - x
if ans % 1 != 0:
ans = ans - ans%1 + 1
if ans < 0:
ans = 0
print(int(ans))
| 7 |
PYTHON3
|
#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;
}
}
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
a,b,c=map(int,input().split())
d=0
while((b+d)/a)*100<c:d+=1
print(d)
| 7 |
PYTHON3
|
n, x, y = map(int, input().split())
left = -1
right = 10000000000
while right - left > 1:
k = (left + right)//2
if x + k >= n * (y/100):
right = k
else:
left = k
#print(n * (y/100), x)
print(right)
| 7 |
PYTHON3
|
import math
number_of_testcases = 1 #int(input())
for _ in range(number_of_testcases):
num_citizen, num_wizard, percentage_demonstration = map(int,input().split())
num_clones_needed = int(math.ceil((num_citizen * percentage_demonstration)/100.0))
#print(num_clones_needed)
if num_wizard >= num_clones_needed:
print(0)
else:
print(num_clones_needed - num_wizard)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
# import sys
# sys.stdin = open("test.in","r")
# sys.stdout = open("test.out.py","w")
from math import ceil as c
n,x,y=map(int,input().split())
a=c((n*y)/100)
if x>=a:
print('0')
else:
print(a-x)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy
sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()
def main():
a,b,c=LI()
x=a*c/100
ans=max(0,math.ceil(x-b))
return ans
# main()
print(main())
| 7 |
PYTHON3
|
import math
n, x, y = map(float, input().split())
required = math.ceil((n * y / 100) - x)
print(required if required >= 0 else 0)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
from math import ceil
n, x, y = list(map(int, input().split()))
ans = float(y / 100) * n
if ((ceil(ans) - x) < 0):
print(0)
else:
print(ceil(ans) - x)
| 7 |
PYTHON3
|
import math
data = input().split()
N, X, Y = int(data[0]), int(data[1]), int(data[2])
clones = math.ceil(N * (Y/100)) - X
if clones > 0:
print(clones)
else:
print(0)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
from math import ceil
n,x,y=map(int,input().split())
req=ceil(n*y/100)
if x>=req:
print(0)
else:
print(req-x)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
import math
n,x,y = map(int, input().split())
v = int(math.ceil((y * n)/100))
if v > x:
print(v - x)
else:
print(0)
| 7 |
PYTHON3
|
n, x, y = map(int, input().split())
real_percentage = (x / n) * 100
needed_clone = 0
while real_percentage < y:
needed_clone += 1
x += 1
real_percentage = (x / n) * 100
print(needed_clone)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
n,x,y=map(int,input().split())
num=(y*n)/100
num1=(y*n)//100
z=num-num1
if z==0 and x<=num:
print(num1-x)
elif z!=0 and x<=num:
print(num1+1-x)
elif x>num:
print(0)
| 7 |
PYTHON3
|
#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();
}
}
| 7 |
CPP
|
import math
n, k, p = map(int, input().split())
need = math.ceil(n*p/100)
res = need-k
print( res if res>0 else 0 )
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
import math
a,b,c=map(int,input().split())
p=math.ceil((c*a)/100)
if p<=b:print(0)
else:print(p-b)
| 7 |
PYTHON3
|
n, x, y = map(int,input().split())
import math
print (0 if x>=n*y/100 else math.ceil(n*y/100 - x))
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
import math
arr = input().split()
n = int(arr[0])
x = int(arr[1])
y = int(arr[2])
ans = ((n*y)/100) - x
if ans > 0:
print(math.ceil(ans))
else:
print('0')
| 7 |
PYTHON3
|
n, wizards, percent = map(int, input().split())
import math
people = math.ceil(percent*n/100)
if people <= wizards:
print(0)
else:
print(people - wizards)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
#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);
}
| 7 |
CPP
|
from sys import stdin, stdout
n, x, y = map(int, stdin.readline().split())
if (x / n) * 100 >= y:
stdout.write('0')
else:
l = 0
r = n * y
while r - l > 1:
m = (r + l) // 2
if (x + m) / n * 100 >= y:
r = m
else:
l = m
stdout.write(str(r))
| 7 |
PYTHON3
|
#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(); }
| 7 |
CPP
|
#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;
}
| 7 |
CPP
|
from math import ceil
n,x,y = map(int,input().split())
total_people_need = ceil((float(n)/100) * float(y))
puppet_need = max(int(total_people_need) - x, 0)
print(puppet_need)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
import math
n,w,p = map(int,input().split())
needed = int(math.ceil((n*p)/100))
ans = needed-w
if ans > 0:
print(ans)
else:
print(0)
| 7 |
PYTHON3
|
#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;
}
| 7 |
CPP
|
[n,x,y] = map(int, input().split())
percent = y/100
minimum = n * percent
if minimum != minimum//1:
minimum = minimum//1 + 1
if x >= minimum:
print(int(0))
else:
print(int(minimum - x))
| 7 |
PYTHON3
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.