Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB8018 - Зэргэлдээ ижил хос тоо

 N тоо ба N тоонууд өгөгдөв.

Эдгээр N  тоонууд дотор зэргэлдээ ижил хос тоо хэд байгааг ол.

Input

Эхний мөрөнд N тоо. ( 2<=N<=100 )

Дараагийн мөрөнд N тоонууд зайгаар тусгаарлагдан өгөгдөнө.

/ Integer төрөл /

Output

Зэргэлдээ ижил хос тоо.

Example

Input:
5
1 3 2 2 3

Output:
1
Input:
4
1 1 1 1
Output:
3

Нэмсэн:Bataa
Огноо:2010-01-05
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 ASM64 BASH BF C CSHARP C++ 4.3.2 CPP CPP14 C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON RUBY SCALA SCM guile SCM qobi ST TCL TEXT WHITESPACE

hide comments
2023-11-22 11:40:00
#include <iostream>

using namespace std;

int main () {
int n, a[200], i, s;
cin >> n;
for (i = 1; i <= n ; i++) {
cin >> a[i];
}
s = 0;
for (i = 1; i < n; i++) {
if(a[i] == a[i+1]) {
s = s + 1;
}
}
cout << s;
}
2021-04-10 05:56:59
Tsend-Ayush bol gorill
2018-04-13 06:08:13



















































































































































































































































































































































































































































































































































dunkuu heden malnuud bodlogoo bodoj chadahgui comment guilgeel suugaad bhiin tsu2






























































































Last edit: 2018-04-13 06:09:48
2017-07-20 14:25:53
#include<iostream>
using namespace std;

int main ()
{
int a,s=0;
cin >>a;
int b[a];
for(int i = 0; i < a; i++)
{

cin >>b[i];
if (b[i] == b[i-1])
s++;
}
}
2016-03-19 10:04:00 lhagvaa
#nclude<stdio.h>
#include<stdlib.h>
int a[1000];#i
int i,j,n,d=0;
int main()
{
scanf("%d",&n);
for(i=1; i<=n; i++)
scanf("%d",&a[i]);
for(i=1; i<=n; i++)
for(j=i+1; j<=n; j++)
{
if(a[i]==a[j+1])
d++;
}
printf("%d",d);
system("pause");
return 0;
}
2014-05-04 08:13:11 buyandalai byambaa
#include<stdio.h>
#include<stdlib.h>
main(){
int a[100],n,i,c=0;
scanf("%d",&n);
for(i=1; i<=n; i++)
scanf("%d",&a[i]);
for(i=1; i<=n; i++)
if (a[i]==a[i+1]) c++;
printf("%d\n",c);
system("pause");
return 0;
}
ene bodlogiin aldaag zasaad ogooch
2012-11-23 03:57:43 Tsendayush
chi tegwel gorilliin holiin ul
2011-10-04 14:34:56 tvmnee_11b
ok Tsend-Ayush bol goril hehe
2010-03-16 09:43:29 Batzorig
ene bolku bnaa
2010-03-15 10:13:52 Erdenebayar
eneniii test ni aldaatai yum shuu yoroosoo bolohgui bna
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.