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-03-31 09:11:26
#include <iostream>
using namespace std;

int main () {
int a,b,c,d,n;
cin >> a >> b >> c >> d;
n=0;
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;
cout << n << endl;
return 0;
}
2022-03-30 05:08:57
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,n,k=0;
cin>>a>>b>>c>>n;

if(a%3==0)k=k+1;
else k=k+0;
if(b%3==0)k=k+1;
else k=k+0;
if(c%3==0)k=k+1;
else k=k+0;
if(n%3==0)k=k+1;
else k=k+0;

cout<<k<<endl;

return 0;
}
eniig huulval mal bolno
2022-03-07 08:20:30
zail
2022-02-18 01:27:32
bhguu
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
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.