fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int T,i,time;
  6. long long n,m,k,loc;
  7. for(i=0;i<T;i++)
  8. {
  9. cin>>n>>m>>k;
  10. loc=1;
  11. while(loc!=n)
  12. {
  13. loc=loc+m;
  14. loc-=k;
  15. time+=1;
  16.  
  17. }
  18. cout<<time;
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
4 2 1
compilation info
prog.cpp: In function 'int main()':
prog.cpp:20: error: expected `}' at end of input
stdout
Standard output is empty