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 <iostream> #include <cstdio> using namespace std; int main() { unsigned int r, x, y; while(scanf("%x,%d,%d", &r, &x, &y) == 3) { r &= ~(1<<x); r &= ~(7<<(y-2)); r |= (6<<(y-2)); printf("%x\n", r); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator