QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#772957#1795. Beer Can GameI_be_wannaCompile Error//C++17203b2024-11-22 23:10:202024-11-22 23:10:25

Judging History

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

  • [2024-11-22 23:10:25]
  • 评测
  • [2024-11-22 23:10:20]
  • 提交

answer

#include<iostream>
using namespace std;
int main(){
	char n[93838989];
	int l;
	for(int i=0;i<93838989;i++){
		cin>>n[i];
	}
	if(n[i]=='a'){
		l=4;
	}else{
		l=0;
	}
	cout<<l;
	return 0;
}

Details

answer.code: In function ‘int main()’:
answer.code:9:14: error: ‘i’ was not declared in this scope
    9 |         if(n[i]=='a'){
      |              ^