1WA,help!!!

Revision en3, by 1804_ykm, 2023-07-19 14:55:35

The first Test point WA, help!!!

Attached question address:1367A

#include<bits/stdc++.h>
using namespace std;
int n,flag;
string s;
int main(){
	cin>>n;
	while(n--){
		cin>>s;
		for(int i=0;i<s.size();i++){
			if(s[i]!=s[i-1]&&flag>0){
				cout<<s[i];
				flag=0;
			}
			else{
				flag++;
			}	
		}
		cout<<endl;
	}
	return 0;
}

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English 1804_ykm 2023-07-19 14:55:35 30 微小的变化: ' 地址:[您要链接到此处的文字...](https://' -> ' 地址:[1367A](https://'
en2 English 1804_ykm 2023-07-19 14:55:10 108
en1 English 1804_ykm 2023-07-19 14:53:15 354 初步修订 (published)