回复 楼主 我爱编程11
帮看看我这个程序问题出在那?谢谢各位了!!!
#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; }