Read from STDIN, Write to STDOUT
Problem
Read different types of data from standard input, process them as shown in output format and print the answer to standard output.
Input format:
First line contains integer N.
Second line contains string S.
Output format:
First line should contain N x 2.
Second line should contain the same string S.
Constraints:
where S length of string S
Time Limit: 1
Memory Limit: 256
Source Limit:
/*
// Sample code to perform I/O:
name = Console.ReadLine(); // Reading input from STDIN
Console.WriteLine("Hi, {0}.", name); // Writing output to STDOUT
// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
*/
// Write your code here
using System;
namespace practice
{
class Program
{
static void Main(string[] args)
{
int a = Convert.ToInt32(Console.ReadLine());
string s = Console.ReadLine();
Console.WriteLine(2 * a);
Console.WriteLine(s);
Console.ReadLine();
}
}
}
Comments
Post a Comment