回复 楼主 我爱编程11
帮看看我这个程序问题出在那?谢谢各位了!!!
2017-12-17 22:38
2017-12-17 22:40
程序代码:#include <iostream>
using namespace std;
int main( void )
{
unsigned long long a,b,c,d,u;
cin >> a >> b >> c >> d >> u;
unsigned long long count = u>=a ? (u-a)/b+1 : 0;
for( unsigned long long gs=c; gs<=u; gs*=d )
{
if( gs<a || (gs-a)%b!=0 )
++count;
}
cout << count;
}
2017-12-18 10:16
2017-12-19 19:46