Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <math.h>
- #include <algorithm>
- #include <stdlib.h>
- #include <string>
- using namespace std;
- int main()
- {
- // freopen("input.txt", "rt", stdin);
- string s1;
- cin>>s1;
- int k=s1.size();
- int c[256];
- int i,j;
- for (j=0;j<256;j++)
- c[j]=0;
- for (i=0;i<k;i++)
- c[int(s1[i])]++;
- for (j=0;j<256;j++)
- if (c[j]==2)
- cout<<char(j);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement