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.|

RGB7110 - 3-д хуваагдах

Өгөгдсөн 4 тоон дотроос 3-д хуваагддаг тоонуудын тоог ол. 

Input

Нэг мөрөнд Int төрлийн 4 тоо зайгаар тусгаарлагдан өгөгдөнө.

Output

3-д хуваагддаг тоонуудын тоо.

Example

Input:
3 12 8 9

Output:
3

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

hide comments
2022-02-08 16:40:21
#include <stdio.h>
main()
{
int a[4],i,n=0;
for (i=0;i < 4; i++)
{
scanf("%d",&a[i]);
if (a[i]%3==0) n++;
}
printf("%d ",n);
}
EZ xD
2022-01-22 01:42:14
#include <iostream>
#include <cmath>
using namespace std;
int main(){
int n[4];
int res=0;
int size = sizeof(n)/sizeof(n[0]);
for(int i=0; i<size; i++){
cin>>n[i];
if(n[i]%3==0){
res++;
}
}
cout<<res;
}


Last edit: 2022-01-22 01:50:21
2022-01-11 12:12:03
davtalj ashiglaj mddeg hun bdimu end
2021-12-09 04:35:33
88181530
zalga
2021-10-17 05:42:00
java:
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = 0;
int[] arr = new int[4];
for(int i = 0; i < 4; i++) {
arr[i] = sc.nextInt();
}
for(int i : arr) {
if (i % 3 == 0) {
count++;
}
}
System.out.println(count);
}
bas haraal idsen novshnuudaa Cgees uuriig taviach
2019-12-17 10:50:23
help


Last edit: 2019-12-17 10:50:42
2019-11-10 17:45:55


Last edit: 2019-11-10 17:46:18
2019-10-24 17:49:12
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e=0;
cin>>a>>b>>c>>d;
if(a%3==0) e=e+1;
if(b%3==0) e=e+1;
if(c%3==0) e=e+1;
if(d%3==0) e=e+1;
cout<<e;
}ez4me
2019-10-10 14:32:19
#include<stdio.h>
int main()
{
int a,b,c,d,n=0;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a%3==0)
{
n=n+1;
}

if(b%3==0)
{
n=n+1;
}

if(c%3==0)
{
n=n+1;
}
if(d%3==0)
{
n=n+1;
}


printf("%d",n);
}
2019-06-05 16:25:08
gfgf
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.