Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
代码有错吗?#include <cstdio> #include <iostream> int main() { unsigned int r, x, y; //scanf("%x,%d,%d", &r, &x, &y); std::cin>>std::hex>>r; std::cin.get(); std::cin>>x; std::cin.get(); std::cin>>y; r&=~(1L<<x); r|=6L<<(y-2); r&=~(1L<<(y-2)); std::cout<<std::hex<<r; return 0; } 两种输入方式,为什么这种总说答案错误,注释掉的c方式结果正确? 我用自己的编译器得到的结果是一样的 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator