编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#1016 #992. 鱼塘 Compile Error 0 0 ms 0 K C / 713 B t330026086 2023-10-15 15:36:48
显示原始代码
#include <stdio.h>
long long main() {
    long long a, b, c;
    int i;
    scanf("%lld %lld %lld", &a, &b, &c);
    t = a % 4;
    z = b % 4;
    x = c % 4;
    for (i = 0, i <= 3, i++) {
        if (t = 0)
            printf("L");
        if (t = 1)
            printf("X");
        if (t = 2)
            printf("T");
        if (t = 3)
            printf("W");
    }
    for (i = 0, i <= 3, i++) {
        if (z = 0)
            printf("L");
        if (z = 1)
            printf("X");
        if (z = 2)
            printf("T");
        if (z = 3)
            printf("W");
    }
    for (i = 0, i <= 3, i++) {
        if (x = 0)
            printf("L");
        if (x = 1)
            printf("X");
        if (x = 2)
            printf("T");
        if (x = 3)
            printf("W");
        retuen 0;
    }

编译信息

/sandbox/1/a.c:2:1: warning: return type of 'main' is not 'int' [-Wmain-return-type]
long long main ()
^
/sandbox/1/a.c:2:1: note: change return type to 'int'
long long main ()
^~~~~~~~~
int
/sandbox/1/a.c:7:5: error: use of undeclared identifier 't'
    t=a%4;
    ^
/sandbox/1/a.c:8:5: error: use of undeclared identifier 'z'
    z=b%4;
    ^
/sandbox/1/a.c:9:5: error: use of undeclared identifier 'x'
    x=c%4;
    ^
/sandbox/1/a.c:10:15: warning: expression result unused [-Wunused-value]
    for (i=0,i<=3,i++){
             ~^ ~
/sandbox/1/a.c:10:22: error: expected ';' in 'for' statement specifier
    for (i=0,i<=3,i++){
                     ^
/sandbox/1/a.c:10:22: error: expected ';' in 'for' statement specifier
/sandbox/1/a.c:11:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(t=0)
           ~^~
/sandbox/1/a.c:11:13: note: place parentheses around the assignment to silence this warning
        if(t=0)
            ^
           (  )
/sandbox/1/a.c:11:13: note: use '==' to turn this assignment into an equality comparison
        if(t=0)
            ^
            ==
/sandbox/1/a.c:11:12: error: use of undeclared identifier 't'
        if(t=0)
           ^
/sandbox/1/a.c:13:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(t=1)
           ~^~
/sandbox/1/a.c:13:13: note: place parentheses around the assignment to silence this warning
        if(t=1)
            ^
           (  )
/sandbox/1/a.c:13:13: note: use '==' to turn this assignment into an equality comparison
        if(t=1)
            ^
            ==
/sandbox/1/a.c:13:12: error: use of undeclared identifier 't'
        if(t=1)
           ^
/sandbox/1/a.c:15:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(t=2)
           ~^~
/sandbox/1/a.c:15:13: note: place parentheses around the assignment to silence this warning
        if(t=2)
            ^
           (  )
/sandbox/1/a.c:15:13: note: use '==' to turn this assignment into an equality comparison
        if(t=2)
            ^
            ==
/sandbox/1/a.c:15:12: error: use of undeclared identifier 't'
        if(t=2)
           ^
/sandbox/1/a.c:17:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(t=3)
           ~^~
/sandbox/1/a.c:17:13: note: place parentheses around the assignment to silence this warning
        if(t=3)
            ^
           (  )
/sandbox/1/a.c:17:13: note: use '==' to turn this assignment into an equality comparison
        if(t=3)
            ^
            ==
/sandbox/1/a.c:17:12: error: use of undeclared identifier 't'
        if(t=3)
           ^
/sandbox/1/a.c:20:15: warning: expression result unused [-Wunused-value]
    for (i=0,i<=3,i++){
             ~^ ~
/sandbox/1/a.c:20:22: error: expected ';' in 'for' statement specifier
    for (i=0,i<=3,i++){
                     ^
/sandbox/1/a.c:20:22: error: expected ';' in 'for' statement specifier
/sandbox/1/a.c:21:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(z=0)
           ~^~
/sandbox/1/a.c:21:13: note: place parentheses around the assignment to silence this warning
        if(z=0)
            ^
           (  )
/sandbox/1/a.c:21:13: note: use '==' to turn this assignment into an equality comparison
        if(z=0)
            ^
            ==
/sandbox/1/a.c:21:12: error: use of undeclared identifier 'z'
        if(z=0)
           ^
/sandbox/1/a.c:23:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(z=1)
           ~^~
/sandbox/1/a.c:23:13: note: place parentheses around the assignment to silence this warning
        if(z=1)
            ^
           (  )
/sandbox/1/a.c:23:13: note: use '==' to turn this assignment into an equality comparison
        if(z=1)
            ^
            ==
/sandbox/1/a.c:23:12: error: use of undeclared identifier 'z'
        if(z=1)
           ^
/sandbox/1/a.c:25:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(z=2)
           ~^~
/sandbox/1/a.c:25:13: note: place parentheses around the assignment to silence this warning
        if(z=2)
            ^
           (  )
/sandbox/1/a.c:25:13: note: use '==' to turn this assignment into an equality comparison
        if(z=2)
            ^
            ==
/sandbox/1/a.c:25:12: error: use of undeclared identifier 'z'
        if(z=2)
           ^
/sandbox/1/a.c:27:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(z=3)
           ~^~
/sandbox/1/a.c:27:13: note: place parentheses around the assignment to silence this warning
        if(z=3)
            ^
           (  )
/sandbox/1/a.c:27:13: note: use '==' to turn this assignment into an equality comparison
        if(z=3)
            ^
            ==
/sandbox/1/a.c:27:12: error: use of undeclared identifier 'z'
        if(z=3)
           ^
/sandbox/1/a.c:29:15: warning: expression result unused [-Wunused-value]
    for (i=0,i<=3,i++){
             ~^ ~
/sandbox/1/a.c:29:22: error: expected ';' in 'for' statement specifier
    for (i=0,i<=3,i++){
                     ^
/sandbox/1/a.c:29:22: error: expected ';' in 'for' statement specifier
/sandbox/1/a.c:30:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(x=0)
           ~^~
/sandbox/1/a.c:30:13: note: place parentheses around the assignment to silence this warning
        if(x=0)
            ^
           (  )
/sandbox/1/a.c:30:13: note: use '==' to turn this assignment into an equality comparison
        if(x=0)
            ^
            ==
/sandbox/1/a.c:30:12: error: use of undeclared identifier 'x'
        if(x=0)
           ^
/sandbox/1/a.c:32:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(x=1)
           ~^~
/sandbox/1/a.c:32:13: note: place parentheses around the assignment to silence this warning
        if(x=1)
            ^
           (  )
/sandbox/1/a.c:32:13: note: use '==' to turn this assignment into an equality comparison
        if(x=1)
            ^
            ==
/sandbox/1/a.c:32:12: error: use of undeclared identifier 'x'
        if(x=1)
           ^
/sandbox/1/a.c:34:13: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
        if(x=2)
           ~^~
/sandbox/1/a.c:34:13: note: place parentheses around the assignment to silence this warning
        if(x=2)
            ^
           (  )
/sandbox/1/a.c:34:13: note: use '==' to turn this assignment into an equality comparison
        if(x=2)
            ^
            ==
fatal error: too many errors emitted, stopping now [-ferror-limit=]
15 warnings and 20 errors generated.