Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

分享

Posted by peter125521 at 2011-10-09 02:59:22 on Problem 3748
#include<stdio.h>

int main()
{
	unsigned int ival;
	int bit_0;
	int bit_110;
	while( scanf( "%x,%d,%d", &ival, &bit_0, &bit_110 ) == 3 ){
		ival &= ~(0x1<<bit_0);
		ival |= 0x3<<(bit_110-1);
		ival &= ~(0x1<<(bit_110-2));
		printf( "%x\n", ival );
	}
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator