标签:cin cst turn span include return tput str nbsp
无耻的暴力
#include<iostream> #include<cstdio> using namespace std; int n; int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); cin>>n; int l=500000000; for(int i=0;i<=l;i++) { if(((i*2)^i)==n) { cout<<i*2<<endl; return 0; } if(((i*2+1)^i)==n) { cout<<i*2+1<<endl; return 0; } } fclose(stdin); fclose(stdout); return 0; }
标签:cin cst turn span include return tput str nbsp
原文地址:http://www.cnblogs.com/19992147orz/p/6005917.html