编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#1902 #993. 汉诺塔问题 Compile Error 0 0 ms 0 K C / 196 B t330005033 2023-10-15 16:59:48
显示原始代码
#include <stdio.h>
int main() {
    double a, t;
    t = 2;
    scanf("%lf", &a);
    while (a >= 2) {
        t = t ^ 2;
        a = a - 1;
    }
    printf("%.0lf", t - 1);
    return 0;
}

编译信息

/sandbox/1/a.c:9:12: error: invalid operands to binary expression ('double' and 'int')
        t=t^2;
          ~^~
1 error generated.