Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB8019 - Ижил хос тоо |
Эхний мөрөнд N тоо, дараагийн мөрөнд N тоонууд зайгаар тусгаарлагдан өгөгдөв.
Эдгээр тоонууд дотор ижил хос тоонууд хэд байгааг ол.
Example
Input:
5
1 3 2 2 3
Output:
2
Input:
4
1 1 1 1
Output:
6
Нэмсэн: | Bataa |
Огноо: | 2010-01-13 |
Хугацааны хязгаарлалт: | 0.100s |
Эх кодын хэмжээний хязгаарлалт: | 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-10-13 06:13:40
#include<bits/stdc++.h> using namespace std; int main(){ int n,a=0,b=0; cin >> n; int arr[n]; for(int i=0; i<n; i++){ cin >> arr[i]; } for (int i=0; i<n; i++){ for (int j=i+1; j<n; j++){ if(arr[j]==arr[i]){ a++; } } } cout << a; } huul sugudaaa |
|
2021-11-22 07:42:53
ХАХАХА БОЛОХГҮЙ ЮМ БАЙНАА Last edit: 2021-11-22 07:43:46 |
|
2017-03-04 06:11:30
#include<stdio.h> #include<stdlib.h> main() { int n,s=0; scanf("%d", &n); int a[n]; for (int i=1; i<=n; i++) { scanf("%d", &a[i]); } for (int j=1; j<=n; j++) { for (int l=1; l<j; l++) { if (a[j]==a[l]) { s=s+1; } } } printf("%d", s); } Last edit: 2017-03-04 06:11:47 |
|
2012-11-30 02:34:36 erdenebayr
gants 2 bodlogo bodood ugux hun bna u amarxandaa |
|
2011-10-04 14:53:27 tvmnee_11b
EFFLORESCENCE| -»S0k!«- iin zow |
|
2010-07-10 07:32:41 George_teller
Ymar amarhan ym be Bymbaa chinii utasnii dugaar hed bilee nadruu msj bicheerei |
|
2010-05-28 11:02:59 CS09D006
yahuu ene bodlogo neg l xetsuu yum |
|
2010-03-09 03:14:45 SS
Tsend-Ayush chine gorill ym bnalee |