Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstring>
- using namespace std;
- const int INF = 1000*1000*1000;
- int main()
- {
- int l,r; cin >> l >> r;
- int k2 = 2;
- int k3 = 3;
- int ans_rk2_ = r/k2;
- int ans_rk3_ = r/k3;
- int ans_lk2_ = (l-1)/k2;
- int ans_lk3_ = (l-1)/k3;
- int result_k2_ = ans_rk2_ - ans_lk2_ ;
- int result_k3_ = ans_rk3_ - ans_lk3_ ;
- if(result_k2_ > result_k3_ )
- {
- cout << 2;
- }
- else
- {
- cout << 3;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement