CF411div2 A. Fake NP

除非l==r 最大值等於本身  那就是2是最多的  每兩個數有一個被除數2 

#include <stdio.h>
#include <bits/stdc++.h>
#define mod 1000000007
#define ll long long  
using namespace std;
int l,r; 
int main()  
{  
    cin>>l>>r;
    if(l==r) cout<<l;
    else if((l%3==0) && (r==l+3))cout<<3;
    else cout<<2<<endl;
    return 0;  
}  


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章