5 solutions

  • 1
    @ 2025-12-31 20:13:23
    #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;
    }
    • 0
      @ 2026-8-20 10:22:22
      #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;
      }
      
      • 0
        @ 2026-8-20 10:21:52
        #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;
        }
        
        • 0
          @ 2026-4-1 11:48:47

          #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
            @ 2025-8-19 16:21:19
            #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
          41
          Accepted
          22
          Uploaded By