Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
6104 | qianjunyi | 珠子计算 | C++ | Wrong Answer | 0 | 0 MS | 248 KB | 227 | 2020-08-23 19:43:06 |
#include<bits/stdc++.h> using namespace std; int t; int a[81]; int n,m; int s=0; int main(){ cin>>t; for(int i=1;i<=t;i++){ cin>>a[i]; n=a[i]; m=a[i-1]; if(n!=m) s=s+1; if(i==t) s=s-1; } cout<<s; }