QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#565120#9310. Permutation Counting 4Longzun_MK2000Compile Error//C++14219b2024-09-15 20:19:332024-09-15 20:19:34

Judging History

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

  • [2024-09-18 14:56:40]
  • hack成功,自动添加数据
  • (/hack/835)
  • [2024-09-18 14:41:06]
  • hack成功,自动添加数据
  • (/hack/831)
  • [2024-09-17 12:14:52]
  • hack成功,自动添加数据
  • (/hack/825)
  • [2024-09-15 20:19:34]
  • 评测
  • [2024-09-15 20:19:33]
  • 提交

answer

#include<iostream>
using namespace std;

signed main{
	int t;
	cin>>t;
	while(t--){
		int ans=1;
		for(int i=1;i<=n;i++){
			int l,r;
			cin>>l>>r;
			ans*=(l-r+1);
		}
		cout<<ans<<endl;
	}
	return 0;
}

详细

answer.code:4:8: error: cannot declare ‘::main’ to be a global variable
    4 | signed main{
      |        ^~~~
answer.code:5:9: error: expected primary-expression before ‘int’
    5 |         int t;
      |         ^~~
answer.code:5:9: error: expected ‘}’ before ‘int’
answer.code:4:12: note: to match this ‘{’
    4 | signed main{
      |            ^
answer.code:6:9: error: ‘cin’ does not name a type
    6 |         cin>>t;
      |         ^~~
answer.code:7:9: error: expected unqualified-id before ‘while’
    7 |         while(t--){
      |         ^~~~~
answer.code:16:9: error: expected unqualified-id before ‘return’
   16 |         return 0;
      |         ^~~~~~
answer.code:17:1: error: expected declaration before ‘}’ token
   17 | }
      | ^