129 条题解

  • 0
    @ 2016-03-22 07:28:25

    编译成功

    foo.cpp:3:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    main()
    ^

    测试数据 #0: Accepted, time = 0 ms, mem = 552 KiB, score = 5

    测试数据 #1: Accepted, time = 0 ms, mem = 552 KiB, score = 15

    测试数据 #2: Accepted, time = 0 ms, mem = 556 KiB, score = 15

    测试数据 #3: Accepted, time = 0 ms, mem = 556 KiB, score = 20

    测试数据 #4: Accepted, time = 0 ms, mem = 556 KiB, score = 20

    测试数据 #5: Accepted, time = 0 ms, mem = 556 KiB, score = 25

    Accepted, time = 0 ms, mem = 556 KiB, score = 100

  • 0
    @ 2016-02-17 18:17:48

    Pascal AC
    var n:longint;
    begin
    read(n);
    n:=sqr(n+1)-1;
    write(n);
    end.

  • 0
    @ 2014-10-28 14:49:57

    Compiling

  • 0
    @ 2014-08-04 15:43:47

    #include<iostream>
    using namespace std;
    main()
    {
    int x;
    cin>>x;
    cout<<x*(x+2);
    }

  • 0
    @ 2014-03-19 20:15:08

    水水水 真的是弱弱版
    纪念第vijos四道不用数组的题

    var x:longint;
    begin readln(x);writeln(x*(x+2));end.

  • 0
    @ 2013-10-07 13:27:57

    var x:longint;
    begin
    read(x);x:=x*(x+2);
    write(x);
    end.
    It's very water!
    纯净水!

  • 0
    @ 2013-10-02 16:33:34

    #in

  • 0
    @ 2013-10-02 16:33:23

    #include <stdio.h>
    int main (){
    long n;
    scanf ("%d",&n);
    printf ("%ld\n",n*n+2*n);
    return 0;
    }

  • 0
    @ 2013-10-02 16:33:10

    #include <stdio.h>
    int main (){
    long n;
    scanf ("%d",&n);
    printf ("%ld\n",n*n+2*n);
    return 0;
    }

  • 0
    @ 2013-09-11 17:24:24

    var
    n:longint;
    begin
    read(n);
    writeln(n*n+2*n);
    end.

  • 0
    @ 2013-08-30 09:18:20

    虽然公式不知道是怎么推的,但此题真的是‘纯净水’!!!

  • 0
    @ 2012-11-09 21:30:15

    这题......

    看着简单得很,写了几个数,但还是没推出来......

    看题解,仍不懂,利用物理学习的一种方法---|---|套公式,AC

  • 0
    @ 2012-10-21 13:26:38

    编译通过...

    ├ 测试数据 01:答案正确... (0ms, 580KB)

    ├ 测试数据 02:答案正确... (0ms, 580KB)

    ├ 测试数据 03:答案正确... (0ms, 580KB)

    ├ 测试数据 04:答案正确... (0ms, 580KB)

    ├ 测试数据 05:答案正确... (0ms, 580KB)

    ├ 测试数据 06:答案正确... (0ms, 580KB)

    ---|---|---|---|---|---|---|---|-

    Accepted / 100 / 0ms / 580KB

    这是除了a+b problem外代码最短的一道题了……

    {

    ID:darkgod-z

    PROG:vijos P1182

    HANG:PASCAL

    }

    var

    k:integer;

    begin

    readln(k);

    writeln(sqr(k)+2*k);

    end.

    手算几个小数很容易得出公式

  • 0
    @ 2012-08-07 23:21:47

    公式!!!水

  • 0
    @ 2012-08-02 15:37:59

    点击查看代码

  • 0
    @ 2012-07-22 21:30:40

    经典大水题

  • 0
    @ 2012-07-18 20:13:13

    像那什么黑白棋,usaco里有

    main(){int n;scanf("%d",&n);printf("%d\n",n*n+n*2);}

  • 0
    @ 2010-04-16 22:34:07

    int a;

    scanf("%d",&a);

    printf("%d",a*(a+2));

  • 0
    @ 2010-03-17 22:53:49

    water!water!我就爱写water!

  • 0
    @ 2009-11-10 11:03:39

    无语!!

信息

ID
1182
难度
1
分类
其他 | 数学 点击显示
标签
递交数
2610
已通过
1729
通过率
66%
被复制
16
上传者