Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://www.hackerrank.com/challenges/30-review-loop
- using System;
- using System.Collections.Generic;
- using System.IO;
- class Solution {
- static void Main(String[] args) {
- /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */
- int db = int.Parse(Console.ReadLine());
- string[] tomb = new string[db];
- for(int i = 0; i < db; i++){
- tomb[i] = Console.ReadLine();
- }
- for(int i = 0; i < db; i++){
- string paros = "";
- string paratlan = "";
- for(int j = 0; j < tomb[i].Length; j++){
- if(j % 2 == 0){
- paros += tomb[i][j];
- }
- else{
- paratlan += tomb[i][j];
- }
- }
- Console.WriteLine(paros + " " + paratlan);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement