#include int main ( void ){__int64 a,b;while ( scanf ( "%I64X %I64X",&a,&b ) = EOF ){b += a;if ( b < 0 ){b = -b;a = '-';}elsea = 0;if ( a )putchar ( a );printf ( "%I64X\n",b );}return 0;}b += a;if ( b < 0 ){b = -b;a = '-';}elsea = 0;if ( a )putchar (
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/13 04:36:29
#include int main ( void ){__int64 a,b;while ( scanf ( "%I64X %I64X",&a,&b ) = EOF ){b += a;if ( b < 0 ){b = -b;a = '-';}elsea = 0;if ( a )putchar ( a );printf ( "%I64X\n",b );}return 0;}b += a;if ( b < 0 ){b = -b;a = '-';}elsea = 0;if ( a )putchar (
#include
int main ( void )
{
__int64 a,b;
while ( scanf ( "%I64X %I64X",&a,&b ) = EOF )
{
b += a;
if ( b < 0 )
{
b = -b;
a = '-';
}
else
a = 0;
if ( a )
putchar ( a );
printf ( "%I64X\n",b );
}
return 0;
}
b += a;
if ( b < 0 )
{
b = -b;
a = '-';
}
else
a = 0;
if ( a )
putchar ( a )这段程序有何作用啊,我觉得没有也行啊 ,
#include int main ( void ){__int64 a,b;while ( scanf ( "%I64X %I64X",&a,&b ) = EOF ){b += a;if ( b < 0 ){b = -b;a = '-';}elsea = 0;if ( a )putchar ( a );printf ( "%I64X\n",b );}return 0;}b += a;if ( b < 0 ){b = -b;a = '-';}elsea = 0;if ( a )putchar (
%X的话会当作正数输出
所以如果b是负数,得先求相反数,然后再手动把负号补上