题解:UVA11247 Income Tax
lailai0916 · · 题解
题意简述
给定最低应税收入
求最大收入 Not found。
解题思路
如果收入小于
收入
整理得:
所以:
如果 Not found;否则输出
参考代码
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const double eps=1e-5;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll m,x;
while(cin>>m>>x&&!(m==0&&x==0))
{
ll v=100.0*(m-1)/(100.0-x)-eps;
if(v<m)cout<<"Not found"<<'\n';
else cout<<v<<'\n';
}
return 0;
}