| 记录编号 | 
        321670 | 
        评测结果 | 
        AAAAAA | 
    
    
        | 题目名称 | 
        38.增强的减法问题 | 
        最终得分 | 
        100 | 
            
    
    
        | 用户昵称 | 
         Go灬Fire | 
        是否通过 | 
        通过 | 
    
    
        | 代码语言 | 
        C++ | 
        运行时间 | 
        0.002 s  | 
    
    
        | 提交时间 | 
        2016-10-13 21:01:07 | 
        内存使用 | 
        0.32 MiB  | 
        
    
    
    
    		显示代码纯文本
		
		/*
	Name: 增强的减法问题 
	Copyright: 
	FROM:http://cogs.pro/cogs/problem/problem.php?pid=38 
	Author: Go灬Fire 
	Date: 13/10/16 20:36
	Description: 基本的问题,再写一遍,复习 
*/
#include<cmath>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#define Begin freopen("sub.in","r",stdin);freopen("sub.out","w",stdout);
#define End fclose(stdin);fclose(stdout);
using namespace std;
const int maxn=1010;
char s1[maxn],s2[maxn];
int c[maxn]; 
void Init();
int Judge(){
	if(strlen(s1+1)>strlen(s2+1))return 1;
	if(strlen(s1+1)<strlen(s2+1))return -1;
	for(int i=1;i<=strlen(s1+1);i++){
		if(s1[i]>s2[i])return 1;
		if(s1[i]<s2[i])return -1;
	}
	return 0;
}
void Jian(int a[],int b[]){
	int len;
	len=max(a[0],b[0]);
	for(int i=1;i<=len;i++){
		c[i]=a[i]-b[i];
		if(c[i]<0){
			c[i]+=10;
			a[i+1]--;
		}
	}
	while(c[len]==0)len--;
	for(int i=len;i>=1;i--)printf("%d",c[i]);
}
int main(){
    Begin;
    Init();
    //system("pause");
    End;
    return 0;
}
void Init(){
	int a[maxn],b[maxn];
	scanf("%s%s",s1+1,s2+1);
	a[0]=strlen(s1+1);b[0]=strlen(s2+1);
	for(int i=1;i<=a[0];i++)a[a[0]-i+1]=s1[i]-48;
	for(int i=1;i<=b[0];i++)b[b[0]-i+1]=s2[i]-48;
	int k=Judge();
	if(k==0){printf("0\n");return;}
	if(k==1)Jian(a,b);
	else {printf("-");Jian(b,a);}
}