题解

1323 条题解

  • 0
    @ 2013-03-18 13:18:39

    ...........................................

  • 0
    @ 2013-03-10 13:15:02

    program Plus;
    var a,b:longint;
    begin
    readln(a,b);
    writeln(a+b);
    end.

  • 0
    @ 2013-02-27 11:46:38

    ###高精度。。。
    #include<iostream>
    #include<cstdlib>
    #include<cstdio>
    using namespace std;
    #define max 1000
    char s1[max+10],s2[max+10];
    int a[max+10],b[max+10],ans[max+10],p;
    int main()
    {
    int i,j=0,len,t,t2,len2;
    for(i=0;i<=max;i++) {a[i]=0; b[i]=0;}
    cin>>s1>>s2;
    for(i=strlen(s1);i>=0;i--,j++) {a[j]=s1[i]-'0';}
    j=0;
    for(i=strlen(s2);i>=0;i--,j++) {b[j]=s2[i]-'0';}
    len=strlen(s1); len2=strlen(s2);
    if(len>len2) t=len;
    else t=len2;
    for(i=1;i<=t;i++) ans[i]=a[i]+b[i];
    for(p=1;p<=t;p++) if(ans[p]>9) {ans[p+1]++; ans[p]=ans[p]%10;}
    for(i=t;i>=1;i--) cout<<ans[i];
    return 0;
    }
    ###速度快了一点

  • 0
    @ 2012-11-18 10:52:51

    #include

    int main()

    {

    int a,b,s;

    do{

    scanf("%d%d",&a,&b);}

    while(a32767||b32767);

    s=a+b;

    printf("%d",s);

    return 0;

    }

  • 0
    @ 2012-11-06 17:37:50

    program n (input,output);

    var

    a,b,c: integer;

    begin

    read(a,b);

    c:=a+b;

    write(c);

    end.

  • 0
    @ 2012-11-05 12:57:29

    #include "stdio.h"

    main()

    {int a,b,sum;

    scanf("%d%d",&a,&b);

    sum=a+b;

    printf("sum=%d",sum);

    }

  • 0
    @ 2012-11-02 20:55:59

    var a,b:longint;

    begin

    readln(a,b);

    writeln(a+b);

    end.

  • 0
    @ 2012-10-31 17:17:13

    #include"stdio.h"

    int main()

    {

    int x,y,sum;

    scanf("%d%d",&x,&y);

    sum=x+y;

    printf("%d\n",sum);

    return 0;

    }

    C99标准解法~

  • 0
    @ 2012-10-29 19:26:53

    #include

    main()

    {

    int x,y,z;

    scanf("%d %d",&x,&y);

    z=x+y;

    printf("%d",z);

    }

  • 0
    @ 2012-10-26 12:56:57

    var x,y,s:longint;

    begin

    read(x,y);

    s:=x+y;

    write(s);

    end.

  • 0
    @ 2012-10-20 08:47:12

    #include“stdio.h”

    #include“stdlib.h”

    int main(){

    int a,b;

    scanf("%d %d",&a,&b);

    printf("%d",a+b)

    }

  • 0
    @ 2012-10-19 17:51:58

    var a,b:integer;

    begin

    read(a,b);

    write(a+b);

    end.

  • 0
    @ 2012-10-18 08:08:47

    program byc1;

    var a,b,sum:integer;

    begin

    read(a,b);

    sum:=a+b;

    writeln(sum);

    end.

  • 0
    @ 2012-10-15 19:46:49

    var

    a,b,c:longint;

    begin

    readln(a,b);

    c:=a+b;

    write(c);

    end.

  • 0
    @ 2012-09-20 18:56:55

    program hu;

    var a,b,c:integer;

    begin

    read(a,b);

    c:=a+b;

    write(c);

    end.

  • 0
    @ 2012-11-13 17:48:09

    var yu,math,eng,num,s:array[1..300] of integer;

    n,i,max,ms,a:integer;

    begin

    read(n);

    for i:=1 to n do

    begin

    readln(yu[i],math[i],eng[i]);

    num[i]:=i;

    s[i]:=yu[i]+math[i]+eng[i];

    end;

    for a:=1 to 5 do

    begin

    max:=0; ms:=0;

    for i:=1 to n do

    begin

    if max

  • 0
    @ 2012-09-16 10:35:48

    var a,b:integer;

    begin

    read(a,b);

    write(a+b);

    end.

  • 0
    @ 2012-09-12 21:38:31

    var a,b:integer;

    begin

    read(a,b);

    write(a+b);

    end.

  • 0
    @ 2012-09-11 22:51:20

    var A,B,c:integer;

    begin

    read('A',A,'B',B);

    c:=A+B;

    write(c);

    end.

  • 0
    @ 2012-09-11 21:46:40

    var

    a,b:array[0..10] of longint;

    i,j,k,l:longint;

    procedure reads(var t1,t2:array of longint);

    var

    i,j,k,l:longint;

    s,s2:string;

    begin

    readln(s);

    i := pos(' ',s);

    t1[0] := i-1;

    for j := i-1 downto 1 do t1 := ord(s[j]) - ord('0');

    t2[0] := length(s) -i;

    for j := length(s) downto i+1 do t2[length(s)-j+1] := ord(s[j]) - ord('0');

    end;

    begin

    reads(a,b);

    for i := 1 to a[0] do

    begin

    inc(b[i],a[i]);

    b := b + b[i] div 10;

    b[i] := b[i] mod 10;

    end;

    for j := i to b[0] do

    begin

    b := b + b[i] div 10;

    b[i] := b[i] mod 10;

    end;

    while b[b[0]+1] 0 do inc(b[0]);

    for i := b[0] downto 1 do write(b[i]); writeln;

    end.

    高精不解释

信息

ID
1000
难度
9
分类
(无)
标签
(无)
递交数
74446
已通过
28492
通过率
38%
被复制
223