AC 0.01 s
Problem url: spoj.com/problems/ATOMS
#include <stdio.h>
int main()
{
int T, time;
scanf("%d", &T);
long long n, m, k;
while(T--)
{
scanf("%lld %lld %lld", &n, &k, &m);
time = 0;
if(k <= m/n)
while(k <= m/n)
{
n *= k;
time++;
}
printf("%d\n", time);
}
}
No comments:
Post a Comment