Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
56808 | 202203xhl | 排队买票 | C++ | Wrong Answer | 0 | 0 MS | 244 KB | 191 | 2022-08-03 14:55:21 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,z=0; char a[30]={0}; for(int i=1;i<=n;i++){ cin>>a[i]; if(i!=1&&a[i]!=a[i-1]) z++; } cout<<z+1; return 0; }