#include<bits/stdc++.h>
//#include<zgood>
using namespace std;
string e[1002],c[1002],ans;
int main(){
	int n,e1,i,c1=0,c2=0;
	ifstream fin("word.txt");
	fin>>n;
	cout<<"欢迎使用单词大挑战系统，一共您将挑战"<<n<<"个单词！\n";
	cout<<"说明：请在中文后输入对应的英文单词，每个单词有三次机会！\n";
	for(i=0;i<n;i++){
		fin>>e[i]>>c[i];
		cout<<c[i]<<endl<<"输入：";
		e1=0;
		while(1){
			cin>>ans;
			if(ans==e[i]){
				c1++;
				cout<<"正确！下一题！\n";
				break;	
			}else{
				e1++;
				c2++; 
				if(e1>2){
					cout<<"已经三次了，正确的是"<<e[i]<<endl; 
					break; 
				}else{
					cout<<"请重新\n输入：";
				}
			}
		}
	}
	cout<<"正确单词数："<<c1<<"，错误次数："<<c2<<"，正确率："<<(double)c1/n*100<<"%!";
	fin.close();
	return 0;
}

