fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int d,f;
  5. cin>>d>>f;
  6. for(int i=f;i<=(d+7);i+=7){
  7. if(i>=d){
  8. cout<<i-d;
  9. return 0;
  10. }
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5288KB
stdin
365 4
stdout
3