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) { ... | 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> t... | 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... | 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... | 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... | 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_nee... | 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, lo... | 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& i... | 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 = 5... | 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... | 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 ... | 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)... | 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" <<... | 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--... | 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 +... | 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... | 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(s... | 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.