2 solutions
-
0
#include<bits/stdc++.h> using namespace std; string t[5]; string s1; int main() { string n; for(int i=1;i<=3;i++) { cin>>t[i]; } cin>>n; int m=n.size(); for(int j=0;j<m;j++) { if(n[j]=='1') { cout<<t[1]; } else if(n[j]=='2') { cout<<t[2]; } else if(n[j]=='3') { cout<<t[3]; } } return 0; } -
-1
#include<bits/stdc++.h> using namespace std; string t[5]; string s1; int main(){ string T; for(int i=1;i<=3;i++){ cin>>t[i]; } cin>>T; int n=T.size(); for(int k=0;k<n;k++){ if(T[k]=='1'){ cout<<t[1]; }else if(T[k]=='2'){ cout<<t[2]; }else if(T[k]=='3'){ cout<<t[3]; } } return 0; }
- 1
Information
- ID
- 2394
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 19
- Accepted
- 12
- Uploaded By