fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int N, F;
  7. cin >> N >> F;
  8.  
  9. N-=N%100;
  10. temp=N;
  11.  
  12. for (int i=0; i<100; i++)
  13. {
  14. N=temp+i;
  15.  
  16.  
  17. if(N%F==0)
  18. {
  19. if(i<10)
  20. {
  21. cout << 0 << i;
  22. break;
  23. }
  24.  
  25. else
  26. {
  27. cout << i;
  28. break;
  29. }
  30. }
  31. }
  32.  
  33.  
  34.  
  35.  
  36. return 0;
  37. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1000
3
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:2: error: ‘temp’ was not declared in this scope
  temp=N;
  ^~~~
stdout
Standard output is empty