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
2022-04-14 04:50:18
#include <iostream>
using namespace std;

int main() {
int a,i,n,pp=0;
cin>>a>>n;
while(a>0){
if(a%10==n)
pp=pp+1;
a=a/10;
}
cout<<pp;

//ez eniig huul
}
2022-04-05 06:28:34
#include<iostream>
using namespace std;
int main()
{
int n,m,h,b=0;
cin>>n>>m;
while(n>0)
{
h=(n%10);
n=(n/10);
if (h==m) b=b+1;
} cout <<b;
} El Arsa <33
2022-03-28 15:20:56
#include <stdio.h>
int main()
{
int n, s=0, a, b;
scanf("%d%d", &n, &b);
while (n>0)
{
a=n%10;
n=n/10;
if (a==b)
{ s=s+1;}
}
printf("%d", s);
return 0;
}

porno2
2022-03-15 08:51:59
#include <iostream>
using namespace std;

int main() {
int n, s=0, a, b;
cin>>n>>b;
while (n>0){
a=n%10;
n=n/10;
if (a==b){
s=s+1;
}
}
cout << s;
return 0;
}
2021-11-16 07:55:31
int n, a, c, b=0 ;
Scanner cs = new Scanner(System.in);
n = cs.nextInt();
c = cs.nextInt();
while( n>=1 )
{
a=n%10;
if(a==c)
b=b+1;
n=n/10;
}
System.out.print(b);
2019-12-21 07:40:55
#include "pch.h"
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
int d = 0;
int e = 0;
while (a >= 1)
{
d = (a % 10);
if (b == d)
{
e = (e + 1);
}
a = (a / 10);
}
cout << e << endl;
return 0;
}
2019-12-15 15:20:12
#include<bits/sdtc++.h>

using namespace std;

int main(){
int s,k,n;

cin>>n;

s=0;
while(n>0) {
k=n%10;
s=s+k;
n=n/10;
}

cout<<s<<endl;

return 0;
}
2019-11-12 08:32:53
qwer
2019-11-07 04:11:37
#include<bits/sdtc++.h>

using namespace std;

int main(){
int s,k,n;

cin>>n;

s=0;
while(n>0) {
k=n%10;
s=s+k;
n=n/10;
}

cout<<s<<endl;

return 0;
}
2019-11-07 03:56:13
#include<bits/sdtc++.h>

using namespace std;

int main(){
int m,a,b,n;

cin>>a>>b;

n=0;
while(a>0) {
m=a%10;
if(m==b) n++;
a=a/10;
}

cout<<n<<endl;

return 0;
}

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.