Wednesday, May 3, 2017

URI Solution 1546 Feedback - Solution in C, C++ | Ad Hoc

URI Solution 1546 Feedback - Solution in C, C++ | Ad Hoc


URI Online Judge Solution  | Ad Hoc
URI Main Problem Link - https://www.urionlinejudge.com.br/judge/en/problems/view/1546

Problem Name: URI Problem 1546 Feedback
Problem Number : URI Problem 1546 Feedback Solution
Online Judge : URI Online Judge Solution
Level: Ad Hoc
Solution Language : C, C plus plus

URI Solution 1546 Feedback Code in CPP:

URI 1546 Solution in C :

#include <stdio.h>
 
int main() {
 
 int i = 0, j = 0, n, k, x;
 
 scanf("%d", &n);
 
 for(i = 0; i < n; ++i)
 {
  scanf("%d", &k);
  
  for(j = 0; j < k; ++j)
  {
   scanf("%d", &x);
   
   if(x == 1){
    printf("Rolien\n");
   }else if(x == 2){
       printf("Naej\n");
   }else if(x == 3){
       printf("Elehcim\n");
   }else{
       printf("Odranoel\n");
   }
  }
 }
 
    return 0;
}


URI 1546  Solution in C++


#include <iostream>
using namespace std;

int main()
{
 int n, k, x;
 
 cin >> n;
 
 for(int i = 0; i < n; ++i)
 {
  cin >> k;
  
  for(int j = 0; j < k; ++j)
  {
   cin >> x;
   
   if(x == 1){
    cout << "Rolien" << endl;
   }else if(x == 2){
    cout << "Naej" << endl;
   }else if(x == 3){
    cout << "Elehcim" << endl;
   }else{
    cout << "Odranoel" << endl;
   }
  }
 }
   
 return 0;
}

No comments:
Write comments

To know more about the problem, give us your valuable commment. We'll try to help you. Thanks

All rights reserved ©2016 -URI ONLINE JUDGE SOLUTION | Developed by Maniruzzaman Akash

© 2016 URI ONLINE JUDGE SOLUTION. Developed by Maniruzzaman Akash | Distributed By Gooyaabi Templates
Powered by Blogger.