-
Notifications
You must be signed in to change notification settings - Fork 0
/
11247.cpp
42 lines (29 loc) · 822 Bytes
/
11247.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
using namespace std;
long long limit, tax_rate;
int main( ) {
while ( true ) {
scanf( "%lld %lld", &limit, &tax_rate );
if ( limit == 0 && tax_rate == 0 ) {
break;
}
if ( limit == 1 || tax_rate == 0 || tax_rate == 100 ) {
printf( "Not found\n" );
continue;
}
long long ans = ( 100 * ( limit-1) / ( 100 - tax_rate ) );
if ( 100 * ( limit-1) % ( 100 - tax_rate ) == 0 ) {
--ans;
}
if ( ans >= limit ) {
printf( "%lld\n", ans );
}else {
printf( "Not found\n" );
}
}
return 0;
}