QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#565125#9310. Permutation Counting 4Longzun_MK2000Compile Error//C++14218b2024-09-15 20:21:012024-09-15 20:21:02

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:21:02]
  • 评测
  • [2024-09-15 20:21:01]
  • 提交

answer

#include<iostream>
using namespace std;

int 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: In function ‘int main()’:
answer.code:9:32: error: ‘n’ was not declared in this scope
    9 |                 for(int i=1;i<=n;i++){
      |                                ^