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

RGB7305 - Цифрийн давталт

Өгөгдсөн тоонд өгөгдсөн цифр хэдэн удаа орсныг ол.

Input

Нэг мөрөнд бүхэл тоо ба цифр зайгаар тусгаарлагдан өгөгдөнө. 

Output

Цифр хэдэн удаа орсон тоо.

Example

Input:
23453 3

Output:
2 

Нэмсэн:Bataa
Огноо:2013-01-09
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт: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
2016-03-18 05:45:34 soninhuu
#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,s,d,f=0;
scanf("%d %d",&a,&s);
while (a>0)
{
d=a%10;
a=a/10;
if(d==s) f=f+1;
}
printf("%d",f);
//system("pause");
return 0;
}
2016-03-18 05:43:36 toogii68
#include<iostream>
using namespace std;
main ()
{
long long n,j,i,s;
cin>>n>>i;
s=0;
while(n>0)
{j=n%10;
if(j%i==0)
s=s+1;
else s=s;
n=n/10;
}
cout<<s;
return 0;
}

Last edit: 2016-03-18 05:44:08
2015-03-15 11:06:38 lhagvaa
#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,s,d,f=0;
scanf("%d %d",&a,&s);
while (a>0)
{
d=a%10;
a=a/10;
if(d==s) f=f+1;
}
printf("%d",f);
system("pause");
return 0;
}
2015-03-15 11:04:52 lhagvaa
#include<stdio.h>
#include<stdlib.h>
int main()
{
int a,s,d,f=0;
scanf("%d %d",&a,&s);
while (a>0)
{
d=a%10;
a=a/10;
if(d==s) f=f+1;
}
printf("%d",d);
system("pause");
return 0;
}
2014-07-06 05:50:07 Дашболд
#include<stdio.h>
main()
{
int n,s=0,o,b;
scanf("%d %d",&n,&b);
while(n>0)
{
o=n%10;
if(o==b)
{
s++;
}
n=n/10;
}
printf("%d",s);
}
2014-03-30 06:06:01 bolormaa
#include<stdio.h>
#include<stdlib.h>
int main(){
int n,i,a;
scanf("%d %d",&n,&a);
{
i=0;
while(n>0) {
int c=n%10;
if(c==a) i++;
n=n/10;
}
printf("%d",i);
system("pause");
return 0;
}
}
2013-12-17 04:18:59 shikhikhutag
#include <stdio.h>

main()
{
int n,s,r,d;
scanf("%d %d",&n,&d);

s=0;

while(n>0)
{
if(n%10==d) s=s+1;
n=n/10;
}
printf("%d",s);
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.