记录详情

Compile Error

foo.c: In function 'main':
foo.c:5:16: error: stray '\357' in program
   scanf("%d",&n);
                ^
foo.c:5:17: error: stray '\274' in program
   scanf("%d",&n);
                 ^
foo.c:5:18: error: stray '\211' in program
   scanf("%d",&n);
                  ^
foo.c:5:19: error: stray '\357' in program
   scanf("%d",&n);
                   ^
foo.c:5:20: error: stray '\274' in program
   scanf("%d",&n);
                    ^
foo.c:5:21: error: stray '\233' in program
   scanf("%d",&n);
                     ^
foo.c:6:3: error: expected ')' before 'for'
   for(i=1;i++)
   ^~~
foo.c:8:5: error: invalid suffix "n" on integer constant
   n=3n+1;
     ^~
foo.c:16:1: error: expected ';' before '}' token
 }
 ^
foo.c:4:7: warning: unused variable 'i' [-Wunused-variable]
 { int i,n;
       ^
foo.c:5:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&n);
   ^~~~~~~~~~~~~~~~~~~~
   for(i=1;i++)
   ~~~~~~~~~~~~~
  { if(n%2!=0)
  ~~~~~~~~~~~~~
   n=3n+1;
   ~~~~~~~~
   else
   ~~~~~
   n=n/2;
   ~~~~~~~
  if(n==1)
  ~~~~~~~~~
   break;
   ~~~~~~~
  }
  ~~
    printf("%d",i); 
    ~~~~~~~~~~~~~~~~~
    return 0;
    ~~~~~~~~~~
 }
 ~  
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
比赛
2021年中北算法竞赛队招新测试
语言
C
递交时间
2021-10-24 17:53:58
评测时间
2021-10-24 17:53:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes