fork(1) download
#include <cstdio>
#include <cmath>

int main() 
{
	double k, p, s, years;				
	scanf("%lf %lf %lf", &k, &p, &s);
	if( s<=k )
	{
		years=0;
		printf("%ld", years);
	}
	else
	{
		years = log( s/k )/log( 1 + (p/100) );
		//применяя функцию округления до ближайшего большего целого, рассчитать количество лет
		printf("%2.0lf", ceil(years) );
	}
	return 0;
}
Success #stdin #stdout 0s 3344KB
stdin
 0 0 0
20 10 20
20 10 30 
0.6 30 21
1.14 0.08 40.00
1000 20 800
stdout
Standard output is empty