language: Pike (pike 7.6.86)
date: 259 days 0 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
    import Stdio;
     
    int main()
    {
            array(int) a = ({0,0,0,0,0,0,0,0,0,1);
            int n,i,j,b;
            sscanf(stdin->gets(), "%d", n);
            for (i=0;i<n;i++) {
                sscanf(stdin->gets(), "%d", b);
                for (j=0;j<9;j++) a[j] = a[j+1] + b*a[j]; 
                a[9] = b*a[9];
            }
            for (i=0;i<10;i++) {
                if (a[i]<0) write("-"); else if (a[i]>0 && i!=0) write("+");
                if (a[i]!=0) {
                        if (a[i]!=1 && a[i]!=-1) write("%d*",a[i]);
                        if (a[i]!=9) write ("X");
                        if (a[i]<8) write("^%d",9-i);
                }
            }
       return 0;
    }
  • upload with new input
  • result: Success     time: 0.14s    memory: 10312 kB     returned value: 10

    prog.pike:5:Missing '}'.
    Pike: Failed to compile script:
    Compilation failed.
    
    /usr/lib/pike/master.pike:2656: master()->_main(({"pike","prog.pike"}),({"TMPDIR=/home/c9n0hV","PATH=/usr/local/bin:/usr/bin:/bin","PWD=/home/c9n0hV","LANG=en_US.UTF-8","SHLVL=0","HOME=/home/c9n0hV"}))