daily pastebin goal
62%
SHARE
TWEET

1

a guest Aug 10th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <math.h>
  4. #include <algorithm>
  5. #include <stdlib.h>
  6. #include <string>
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.    // freopen("input.txt", "rt", stdin);
  12.     string s1;
  13.     cin>>s1;
  14.     int k=s1.size();
  15.     int c[256];
  16.     int i,j;
  17.     for (j=0;j<256;j++)
  18.         c[j]=0;
  19.     for (i=0;i<k;i++)
  20.         c[int(s1[i])]++;
  21.     for (j=0;j<256;j++)
  22.         if (c[j]==2)
  23.             cout<<char(j);
  24.     return 0;
  25.  
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top