跳到正文

个人记录

打字测试

maoxianqi约 5 分钟
原文
文章信息与版本

文章信息

收录
2026年2月14日
更新
2026年2月14日
篇幅
约 5 分钟

版本

  1. v2当前
  2. v1
C++
#include<bits/stdc++.h>
using namespace std;
string s1="yourrideisheregreedygiftgiversfridaythethirteenthbrokennecklacemilkingcowstransformationsnamethatnumberpalindromicsquaresdualpalindromesmixingmilkbarnrepaircalfflacprimecryptarithmcombinationlockpackingrectanglesarithmeticprogressionsmothersmilknumbertrianglesprimepalindromessuperprimeribcheckerchallengethecastleorderedfractionssortingathreevaluedsequencehealthyholsteinshammingcodesprefacenumberingsubsetsumsrunaroundnumberspartylampslongestprefixcowpedigreeszerosumcontrollingcompaniesconcommoneysystemsthetamworthtwooverfencingcowtoursbessiecomehomefractionstodecimalsagrinetscoreinflationhumblenumbersshapingregionscontactstampsfactorialsstringsobitsspinningwheels";
string s2="feedratiosmagicwquaressweetbutterridingthefencesshoppingofferscamelothomeontherangeagameclosedfencesamericanferitageelectricfencerausousrockersbeefmcnuggetsfencerailsfenceloopscryptcowgraphydrainageditchestheperfectstalljobprocessingcowcyclesbuylowbuylowertheprimesstreetracelettergameshuttlepuzzlepollutantcontrolframeupfencingthecowsstarrynightmusicalthemessnailtrailswisconsinsquaremilkmeasuringwindowareanetworkofschoolsbigbarnalllatinsquarescanadatourcharacterrecognitiontelecowmunicationpicturehiddenpasswordtwofivemilkpumpinggcowdatemooriokartmowingredistrictingexercise";
string s3="poetryshortcutsleepyspjdiningcowpatibilityteamworkgatheringbalanceitouttalentshowmilkingorderoutofsortsdisruptionoutofsortstraintrackingtamingtheherddirectorytraversalsnowbootscowgymnastsnewbarnsslingshotstamppaintingcowatlargenootubesprinklerscowatlargelifeguardshaybalefeastbarnpaintingapieforapiegreedygifttakerspushaboxstandingoutfromtheherdcownavigationhoofpaperscissorsbalancedphotomodernartbovinegenomicswhydidthecowcrosstheroadwhydidthecowcrosstheroadbuildingatallbarnsubsequencereversalpromotioncountingcoubasicwhydidthecowcrosstheroadswitchgrasswhydidthecowcrosstheroadmodernart";

int main(){
    string s;
    int sum=0;
    int tim=time(0);
	cout<<"按任意键开始,选择文章(1~3)";
	int t;
	cin>>t;
	string s0;
	if(t==1) s0=s1;
	if(t==2) s0=s2;
	if(t==3) s0=s3;
	while(1)
	{
		system("cls");
	    srand(time(0));
	    int t2=time(0);
		cout<<"打字速度:"<<sum*60/(t2-tim+1)<<"个/分"<<endl;
		for(int i=0;i<=30;i++)
		cout<<s0[i];
		cout<<endl;
		cin>>s;
		for(;s!="";)
		{
			if(s[0]==s0[0])
			{
				sum++;s.erase(0,1);s0.erase(0,1);
			}
			else break;
		}
	}

	return 0;
}
原文