fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. int a,b;
  6.  
  7. void init(){
  8. cin>>a;
  9. cin>>b;
  10.  
  11. }
  12. void solve(){
  13. int dem = b / 3 - (a - 1) / 3;
  14. cout << dem;
  15. }
  16.  
  17. int main(){
  18. init();
  19. solve();
  20. return 0;
  21.  
  22. }
  23.  
Success #stdin #stdout 0.01s 5320KB
stdin
4
10
stdout
2