QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#744123#8986. Call for Problemslwl2005Compile Error//C++98296b2024-11-13 20:55:472024-11-13 20:55:53

Judging History

This is the latest submission verdict.

  • [2024-11-13 20:55:53]
  • Judged
  • [2024-11-13 20:55:47]
  • Submitted

answer

#include<stdio.h>
#include<iostream>
using namespace std:
int main()
{
       int n,x,num=0;
       scanf(“%d”,&n);
       for(int i=1;i<=n;i++)
      {
           scanf("%d",&x);
            if(x%2==1)
                  num++;
     }
      printf("%d\n",num);
     return 0;
}

详细

answer.code:7:14: error: extended character “ is not valid in an identifier
    7 |        scanf(“%d”,&n);
      |              ^
answer.code:7:16: error: extended character ” is not valid in an identifier
    7 |        scanf(“%d”,&n);
      |                ^
answer.code:3:20: error: expected ‘;’ before ‘:’ token
    3 | using namespace std:
      |                    ^
      |                    ;
answer.code:3:20: error: expected unqualified-id before ‘:’ token