题解

1323 条题解

  • 0
    @ 2016-03-19 03:54:45

    Java作死版
    ```java
    import java.math.BigDecimal;
    import java.util.*;

    public class Main {
    public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    BigDecimal a = BigDecimal.valueOf(scanner.nextLong());
    BigDecimal b = BigDecimal.valueOf(scanner.nextLong());
    for(;b.longValue()>0;b=b.subtract(BigDecimal.ONE)){
    a = a.add(BigDecimal.ONE);
    }
    System.out.println(a.toString());
    scanner.close();
    }
    }
    ```

  • 0
    @ 2016-02-29 16:57:30
    var a,b:longint;
    begin
        readln(a,b);
        writeln(a+b);
    end.
    
  • 0
    @ 2016-02-19 16:20:15

    import java.io.*;
    import java.util.*;

    public class Main
    {
    public static void main (String args[]) throws Exception
    {
    BufferedReader stdin =
    new BufferedReader(
    new InputStreamReader(System.in));

    String line = stdin.readLine();
    StringTokenizer st = new StringTokenizer(line);
    int a = Integer.parseInt(st.nextToken());
    int b = Integer.parseInt(st.nextToken());
    System.out.println(a+b);
    }
    }

  • 0
    @ 2016-02-17 23:36:14

    编译成功

    测试数据 #0: WrongAnswer, time = 0 ms, mem = 504 KiB, score = 0

    测试数据 #1: WrongAnswer, time = 0 ms, mem = 504 KiB, score = 0

    测试数据 #2: WrongAnswer, time = 0 ms, mem = 512 KiB, score = 0

    测试数据 #3: WrongAnswer, time = 0 ms, mem = 508 KiB, score = 0

    测试数据 #4: WrongAnswer, time = 0 ms, mem = 508 KiB, score = 0

    测试数据 #5: WrongAnswer, time = 0 ms, mem = 508 KiB, score = 0

    测试数据 #6: WrongAnswer, time = 0 ms, mem = 504 KiB, score = 0

    测试数据 #7: WrongAnswer, time = 0 ms, mem = 504 KiB, score = 0

    测试数据 #8: WrongAnswer, time = 15 ms, mem = 504 KiB, score = 0

    测试数据 #9: WrongAnswer, time = 15 ms, mem = 508 KiB, score = 0

    WrongAnswer, time = 30 ms, mem = 512 KiB, score = 0

  • 0
    @ 2016-02-17 23:31:19

    不是跟hello world一样吗,真是……
    c++
    #include<stdio.h>
    int main(){
    printf("A+B problem\n");
    return 0;
    }

  • 0
    @ 2016-02-09 20:19:10

    #include<cstdio>
    using namespace std;
    int a, b;
    int main()
    {
    scanf("%d%d",&a,&b);
    printf("%d\n",(a+b));
    return 0;
    }

  • 0
    @ 2015-12-14 03:12:43

    #include<stdio.h>
    int main()
    {
    int x,y;
    scanf("%d %d",&x,&y);
    printf("%d",x+y);
    return 0;
    }

  • 0
    @ 2015-12-11 07:56:51

    include<iostream> include<cmath> include<cstdio> include<cstring> include<algorithm>
    using namespace std;
    int main()
    {
    //freopen("p.in","r",stdin);
    //freopen("p.out","w",stdout);
    int a,b,st[100000],maxx=1,g;
    cin>>a>>b;
    for(int i=a;i>=1;i--)
    {
    g=1;
    st[1]++;
    while(st[g]>=10)
    {
    st[g]-=10;
    g++;
    st[g]+=1;
    }
    maxx=max(g,maxx);
    }
    for(int j=b;j>=1;j--)
    {
    g=1;
    st[1]++;
    while(st[g]>=10)
    {
    st[g]-=10;
    g++;
    st[g]+=1;
    }
    maxx=max(g,maxx);
    }
    for(int i=maxx;i>=1;i--)
    cout<<st[i];
    return 0;

  • 0
    @ 2015-12-11 07:54:48

    果断高精度。。。。。。。。。。。。。。。。。。。。。。。

    #include<iostream>
    #include<cmath>
    #include<cstdio>
    #include<cstring>
    #include<algorithm>
    using namespace std;
    int main()
    {
    //freopen("p.in","r",stdin);
    //freopen("p.out","w",stdout);
    int a,b,st[100000],maxx=1,g;
    cin>>a>>b;
    for(int i=a;i>=1;i--)
    {
    g=1;
    st[1]++;
    while(st[g]>=10)
    {
    st[g]-=10;
    g++;
    st[g]+=1;
    }
    maxx=max(g,maxx);
    }
    for(int j=b;j>=1;j--)
    {
    g=1;
    st[1]++;
    while(st[g]>=10)
    {
    st[g]-=10;
    g++;
    st[g]+=1;
    }
    maxx=max(g,maxx);
    }
    for(int i=maxx;i>=1;i--)
    cout<<st[i];
    return 0;
    }

  • 0
    @ 2015-12-06 20:05:58

    integer就够了~~~~~

  • 0
    @ 2015-11-29 16:38:18

    var a,b"inteer;
    begin
    readln(a,b);
    writeln(a+b);
    end.
    我想吐

  • 0
    @ 2015-11-29 16:36:17

    Free Pascal Compiler version 2.6.2 [2013/02/12] for i386
    Copyright (c) 1993-2012 by Florian Klaempfl and others
    Target OS: Win32 for i386
    Compiling foo.pas
    Linking foo.exe
    5 lines compiled, 0.1 sec , 27904 bytes code, 1628 bytes data
    测试数据 #0: Accepted, time = 0 ms, mem = 612 KiB, score = 10
    测试数据 #1: Accepted, time = 0 ms, mem = 616 KiB, score = 10
    测试数据 #2: Accepted, time = 0 ms, mem = 612 KiB, score = 10
    测试数据 #3: Accepted, time = 15 ms, mem = 612 KiB, score = 10
    测试数据 #4: Accepted, time = 15 ms, mem = 612 KiB, score = 10
    测试数据 #5: Accepted, time = 0 ms, mem = 612 KiB, score = 10
    测试数据 #6: Accepted, time = 0 ms, mem = 608 KiB, score = 10
    测试数据 #7: Accepted, time = 0 ms, mem = 612 KiB, score = 10
    测试数据 #8: Accepted, time = 0 ms, mem = 612 KiB, score = 10
    测试数据 #9: Accepted, time = 0 ms, mem = 612 KiB, score = 10
    Accepted, time = 30 ms, mem = 616 KiB, score = 100

  • 0
    @ 2015-11-22 10:27:53

    #include<iostream>
    #include<cstdio>
    #include<cstring>
    using namespace std;
    int main()
    {
    char a1[100],b1[100];
    int a[100],b[100],c[100],lena,lenb,lenc,i,x;
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
    gets(a1);
    gets(b1);
    lena=strlen(a1);
    lenb=strlen(b1);
    for(i=0;i<=lena-1;i++)
    a[lena-i]=a1[i]-48;
    for(i=0;i<=lenb-1;i++)
    b[lenb-i]=b1[i]-48;
    lenc=1;
    x=0;
    while(lenc<=lena||lenc<=lenb)
    {
    c[lenc]=a[lenc]+b[lenc]+x;
    x=c[lenc]/10;
    c[lenc]%=10;
    lenc++;
    }
    c[lenc]=x;
    if(c[lenc]==0)
    lenc--;
    for(i=lenc;i>=1;i--)
    cout<<c[i];
    cout<<endl;
    return 0;
    }

  • 0
    @ 2015-11-11 16:20:06

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

  • 0
    @ 2015-11-05 22:17:26

    #include<stdio.h>
    #include<stdlib.h>
    int main()
    {
    int a,b;
    scanf("%d %d",&a,&b);
    printf("%d\n",a+b);
    system("pause");
    return 0;
    }

  • 0
    @ 2015-11-05 16:22:09

    #include <stdio.h>

    int main()
    {
    int a,b;
    scanf("%d%d",&a,&b);
    printf("%d\n",a+b);
    return 0;
    }

  • 0
    @ 2015-11-04 18:40:29

    #include <stdio.h>

    int main()
    {
    int a,b;
    scanf("%d%d",&a,&b);
    printf("%d\n",a+b);

    //system("PAUSE");
    return 0;
    }

  • 0
    @ 2015-10-26 16:47:49

    #include <stdio.h>
    int main()
    {
    int a,b;
    scanf("%d%d",&a,&b);
    printf("%d\n",a+b);

    system("PAUSE");

    return 0;
    }

  • 0
    @ 2015-04-22 21:29:13

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

  • 0
    @ 2015-04-22 21:29:00

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

信息

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