THPTTD_68 - Mật Khẩu_NĐ9

View as PDF

Submit solution

Points: 5.00 (partial)
Time limit: 1.0s
Memory limit: 256M
Input: matkhau.inp
Output: matkhau.out

Author:
Problem type
Allowed languages
C, C#, C++, Go, Java, JavaScript, Kotlin, Pascal, Perl, PHP, Python, Ruby, Rust, Scratch, Swift

In case the statement didn't load correctly, you can download the statement here: Statement


Comments

Please read the guidelines before commenting.



  • 0
    thangok  commented on April 15, 2024, 2:54 a.m.

    include<bits/stdc++.h>

    using namespace std;

    int main(){ iosbase::syncwith_stdio(false); cin.tie(0);cout.tie(0); freopen("MatKhau.Inp","r",stdin); freopen("MatKhau.Out","w",stdout); string s,k; int n; cin>>n; cin.ignore(); while(n--){ getline(cin,s); for(int i=0;i<s.length();i++){ bool check=true; for(int j=0;j<s.length();j++){ if((s[i]==s[j])&&(i!=j)) {check=false; break;} } if(check==true) k+=s[i]; } } cout<<k; return 0; }