solution
stringlengths
11
983k
difficulty
int64
0
21
language
stringclasses
2 values
#include <bits/stdc++.h> using namespace std; 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; return EXIT_SUCCESS; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; double z, ans, x1; cin >> n >> x >> y; z = (y * n * 1.0) / 100; ans = ceil(z) - x; if (ans > 0) { x1 = ans; } else { x1 = 0; } cout << x1 << endl; return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; double per = ceil((n * y) / 100.00); int m = (int)per; if ((m - x) <= 0) cout << "0"; else cout << m - x; return 0; }
7
CPP
n,x,y=map(int,input().split()) if((n*y)%100): if(int(n*y/100)+1<x): print(0) else: print(int(n*y/100)+1-x) else: if(int(n*y/100)<x): print(0) else: print(int(n*y/100)-x)
7
PYTHON3
# python3 import sys, threading, os.path import collections, heapq, math,bisect import string from platform import python_version import itertools sys.setrecursionlimit(10**6) threading.stack_size(2**27) def main(): if os.path.exists('input.txt'): input = open('input.txt', 'r') else: input = sys.stdin #--------------------------------INPUT--------------------------------- n,x,y = list(map(int, input.readline().split())) per = math.ceil((y/100)*n) if per > x : output = per - x else: output = 0 #-------------------------------OUTPUT---------------------------------- if os.path.exists('output.txt'): open('output.txt', 'w').writelines(str(output)) else: sys.stdout.write(str(output)) if __name__ == '__main__': main() #threading.Thread(target=main).start()
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0), cout.tie(0); int n, x, y; cin >> n >> x >> y; int need = ceil(n * (y / 100.00)); cout << max(need - x, 0) << endl; return 0; }
7
CPP
#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; }
7
CPP
#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; }
7
CPP
import math n , x, y = list(map(int, input().split())) temp = math.ceil( (y/100) * n) if temp - x >0: print(temp - x) else: print(0)
7
PYTHON3
#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; }
7
CPP
#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)); }
7
CPP
n, x, y = map(int, input().strip().split()) answer = max(0, - ((-y * n)//100) - x) print(answer)
7
PYTHON3
from math import ceil n, x, y = map(int, input().split()) tot = ceil(n * y / 100) print(max(0, tot - x))
7
PYTHON3
#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; }
7
CPP
#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; }
7
CPP
#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; }
7
CPP
import math def solve(n,x,y): p = math.ceil(n*y/100) if x >= p: return 0 return abs(p-x) def main(): i =list(map(int,input().split(' '))) print(solve(*i)) main()
7
PYTHON3
#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); }
7
CPP
n,x,y=map(int,input().split()) a=(y*n) if (a%100)==0: a=a//100 else: a=a//100+1 if (x>=a): print("0") else: print(abs(x-a))
7
PYTHON3
#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)); }
7
CPP
#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; }
7
CPP
from math import ceil def magicians(n, x, y): z = ceil(n * y / 100) if x < z: return z - x return 0 N, X, Y = [int(i) for i in input().split()] print(magicians(N, X, Y))
7
PYTHON3
from math import ceil n, x, y = map(int, input().split()) print(max(0, ceil(n * y / 100) - x))
7
PYTHON3
import math n, x, y = map(int, input().split()) print(max(0,math.ceil(y * n / 100) - x))
7
PYTHON3
#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; }
7
CPP
#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; }
7
CPP
n, x, y = map(int, input().split()) p = int((n / 100) * y + 0.9999999) if p <= x: print(0) else: print(p - x)
7
PYTHON3
#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; }
7
CPP
#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; }
7
CPP
a,b,c=map(int,input().split()) d=0 while (b/a)*100<c: b+=1 d+=1 print(d)
7
PYTHON3
#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; }
7
CPP
from math import ceil n,x,y = map(int,input().split()) print(max(0,ceil((n*y)/100 - x)))
7
PYTHON3
#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; }
7
CPP
n, x, y = map(int, input().split()) people = n * y / 100 if not people.is_integer(): people = int(people) + 1 else: people = int(people) if people < x: print(0) else: print(people - x)
7
PYTHON3
import math (n, x, y) = map(int, input().split(' ')) f = math.ceil((float(y)/100 * n) - x) print(max(0, f))
7
PYTHON3
import math n, x, y = map(int, input().split()) print(max(0, math.ceil((n * y) / 100) - x))
7
PYTHON3
import sys import math import bisect def solve(n, x, y): ans = 0 while (x + ans) * 100 < y * n: ans += 1 return ans def main(): n, x, y = map(int, input().split()) print(solve(n, x, y)) if __name__ == "__main__": main()
7
PYTHON3
#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; } }
7
CPP
import io import os #input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline import math def main(): n, x, y = map(int, input().split()) c = 0 while math.floor((x+c)/n*100) < y: c += 1 print(c) if __name__ == '__main__': main()
7
PYTHON3
#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"); }
7
CPP
import math n, x, y = map(int, input().split()) porc = (y*n)/100 # print(porc) faltam = math.ceil(porc - x) print(max(faltam, 0))
7
PYTHON3
import math n, x, y = map(int, input().split()) clones = math.ceil(y * n / 100) - x if clones >= 0: print(clones) else: print(0)
7
PYTHON3
#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; }
7
CPP
#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); }
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; if (x < 1) x = 0; cout << x << endl; return 0; }
7
CPP
#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; }
7
CPP
#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))); }
7
CPP
import math n,x,y=list(map(int,input().split())) a=math.ceil(n*y/100) if a>x: print(a-x) else: print(0)
7
PYTHON3
#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; }
7
CPP
#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; }
7
CPP
#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); }
7
CPP
import math n, x, y = [int(s) for s in input().split(' ')] c = max(math.ceil(n * (y / 100) - x), 0) print(c)
7
PYTHON3
# cook your dish here from sys import stdin, stdout import math from itertools import permutations, combinations from collections import defaultdict from bisect import bisect_left def L(): return list(map(int, stdin.readline().split())) def In(): return map(int, stdin.readline().split()) def I(): return int(stdin.readline()) P = 1000000007 n, x, y = In() y1 = int(math.ceil((y/100)*n)) if x < y1: print(y1-x) else: print(0)
7
PYTHON3
#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; }
7
CPP
from math import ceil has, going, perc = [int(x) for x in input().split()] need = ceil(has * perc / 100) print(max(0, need - going))
7
PYTHON3
#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; }
7
CPP
#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; }
7
CPP
import math n,x,y=map(int,input().split()) k=(y/100)*n k=math.ceil(k) if k<=x: print(0) else: print(abs(k-x))
7
PYTHON3
import math n,x,y=map(int,input().split()) k=math.ceil(y*n/100) if k>x: print(k-x) else: print(0)
7
PYTHON3
#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; }
7
CPP
n,x,y=list(map(int,input().split())) sam=(y/100)*n if int(sam)==sam: if x>=sam: print(0) else: print(int(sam)-x) else: sam=int(sam)+1 if x>=sam: print(0) else: print(sam-x)
7
PYTHON3
import math n, x, y = map(int, input().split()) ans = max(0, math.ceil(y / 100 * n) - x) print(ans)
7
PYTHON3
#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; }
7
CPP
n,m,k=[int(x) for x in input().split(' ')] per=(n*k+99)//100 print(max(0,per-m))
7
PYTHON3
#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; }
7
CPP
#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)); } }
7
CPP
import math n,x,y = map(int, input() .split()) t = math.ceil((y/100) * n) if x > t : print(0) else: print(t-x)
7
PYTHON3
n, x, y = map(int, input().split()) t = 0 while (x+t)/n < y/100: t += 1 print(t)
7
PYTHON3
#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; }
7
CPP
# coding: utf-8 n, x, y = [int(i) for i in input().split()] ans = int((y/100*n)-x) if (ans+x)/n < y/100: ans += 1 if ans > 0: print(ans) else: print(0)
7
PYTHON3
n,x,y=map(int,input().split()) print(max(0, -((100 * x - n * y) // 100)))
7
PYTHON3
#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"; }
7
CPP
from math import ceil a,b,c = map(int,input().split()) t = c/100 # print(b/a) # print(t-b/a) if t <= b/a: print(0) else: l = float("{:.4f}".format(a*(t-(b/a)))) print(ceil(l))
7
PYTHON3
#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; } }
7
CPP
n, x, y = map(int, input().split()) needed = (n * y + 99) // 100 print(max(0, needed - x))
7
PYTHON3
import math n,x,y=map(int,input().split()) k=math.ceil((y*n)/100)-x if k>=0:print(k) else:print(0)
7
PYTHON3
n,x,y=map(int,input().split()) b=((n*y)/100) m=((n*y)%100) if b > x : if m: print((int(b)+1)-x) else: print(int(b)-x) else : print(0)
7
PYTHON3
from math import ceil n,w,perc=list(map(int,input().split())) print(max(0,ceil(n*(perc/100))-w))
7
PYTHON3
import math n,x,y=[int(x) for x in input().split()] people=math.ceil((y/100)*n) if(people<=x): print(0) else: print(people-x)
7
PYTHON3
# import sys # sys.stdin=open("input1.in","r") # sys.stdout=open("OUTPUT3.out","w") n,x,y=map(int,input().split()) required=(y*n)//100+bool((y*n)%100) if x>required: print(0) else: print(required-x)
7
PYTHON3
import decimal D = decimal.Decimal l1 = [int(x) for x in input().split()] n,x,y = l1[0],l1[1],l1[2] need = n*y have = x*100 extra = 0 i=0 while need-have>extra: extra+=100 i+=1 print(i)
7
PYTHON3
#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; }
7
CPP
#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; }
7
CPP
#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; }
7
CPP
from math import ceil n, x, y = map(int, input().split()) target = ceil(n*(y/100)) if target-x >0: print(target-x) else: print(0)
7
PYTHON3
#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; }
7
CPP
from math import ceil n, x, y = map(int, input().split()) temp = ceil((y/100) * n) print(max(temp-x, 0))
7
PYTHON3
n,x,y=map(int,input().split()) print(max(0,(0--n*y//100)-x))
7
PYTHON3
import math as m n=[float(i) for i in input().split()] o=m.ceil(n[0]*(n[2]/100)) print(o-int(n[1]) if o>=int(n[1]) else 0)
7
PYTHON3
# -*- coding: utf-8 -*- """ Created on Thu May 27 09:37:05 2021 @author: Vineet """ import math n,x,y=map(int,input().split()) a=math.ceil((y/100)*n ) if a>x: b=a-x print(b) else: print(0)
7
PYTHON3
#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; }
7
CPP
#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; }
7
CPP
from math import ceil n,x,y = map(int,input().split(" ")) Answer = 0 if (y/100) * n >= x : Answer = ((y/100) * n) - x print(ceil(Answer))
7
PYTHON3
#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; }
7
CPP
#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); }
7
CPP
from math import ceil n,x,y=map(int,input().split()) w=ceil((n*y)/100) if w-x>=0: print(w-x) else: print("0")
7
PYTHON3
#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); }
7
CPP
#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; }
7
CPP
#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; }
7
CPP
#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; }
7
CPP