题意:找规律
思路:找规律
#include<iostream> #include<stdio.h> using namespace std; int main(){ int n,x,y; scanf("%d",&n); while(n--){ scanf("%d%d",&x,&y); if(x==y)x&1?printf("%d\n",x+x-1):printf("%d\n",x+x); else if(x-y==2)x&1?printf("%d\n",x+y-1):printf("%d\n",x+y); else printf("No Number\n"); } return 0; }
时间: 2024-10-31 13:53:56