PROBLEM LINK:
Setter: inov_adm
Testers: utkarsh_25dec, iceknight1093
DIFFICULTY:
401
PREREQUISITES:
None
PROBLEM:
Alice buys a toy with a selling price of 100 rupees. There is a discount of x percent on the toy. Find the amount Alice needs to pay for it.
EXPLANATION:
A discount of x percentage on 100 rupees corresponds to a discount of x rupees. So the amount needed to be paid is 100 - x.
TIME COMPLEXITY:
Time complexity is O(1).
SOLUTION:
Editorialist's Solution
#include <iostream>
using namespace std;
int T,x;
int main() {
cin>>T;
while(T--)
{
cin>>x;
cout<<100-x<<"\n";
}
return 0;
}
Tester's Solution
for _ in range(int(input())):
x = int(input())
print(100-x)