QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#102601#6182. 6G 网络问题abcCompile Error//C++14239b2023-05-03 14:58:582023-05-03 14:59:01

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-03 14:59:01]
  • 评测
  • [2023-05-03 14:58:58]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll n;
while(scanf("%lld",&n)==1) {
if(n==1) puts("1");
else if(n==2) puts("3");
else if(n==3) puts("6");
else printf("%lld\n",n*(n-1)/2);
return 0;
}

詳細信息

answer.code: In function ‘int main()’:
answer.code:12:2: error: expected ‘}’ at end of input
   12 | }
      |  ^
answer.code:4:12: note: to match this ‘{’
    4 | int main() {
      |            ^