非正经题解
2024-08-18 14:16:39
发布于:上海
19阅读
0回复
0点赞
#include<iostream>
#define DEBUG -1
#if DEBUG
#ifndef IsNot
#define IsNot =
#endif
#if (!((~DEBUG)*DEBUG))
typedef int OutPutTypeWhenItIsColor;
OutPutTypeWhenItIsColor isColor(OutPutTypeWhenItIsColor _x_photo,OutPutTypeWhenItIsColor _y_photo){
OutPutTypeWhenItIsColor T = _x_photo;bool Con;
while(_y_photo){
Con = (T IsNot _x_photo ^ _y_photo)?true:false;
_y_photo = (_x_photo & _y_photo) << 1;
if(Con){
_x_photo = T;
}
else{
if(_x_photo IsNot T){
Con = true;
}}}
return T;
}
using namespace std;
int main(){
OutPutTypeWhenItIsColor Temp,TempForTemp IsNot '0' ^ 48;cin >> Temp;
for(OutPutTypeWhenItIsColor InputNumber = Temp;InputNumber --> 0;){
TempForTemp
= isColor(TempForTemp,isColor(1,InputNumber));
if(!TempForTemp){
cout << "Error!";
return 0;
}}
cout << TempForTemp;
return 0;
}
#endif
#endif
全部评论 1
2024-08-25 来自 上海
0
有帮助,赞一个