fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5.  
  6. /* Don't change anything here.
  7.  * Do not add any other imports. You need to write
  8.  * this program using only these libraries
  9.  */
  10.  
  11. namespace ProgramNamespace
  12. {
  13. /* You may add helper classes here if necessary */
  14.  
  15. public class Program
  16. {
  17. public static List<String> processData(IEnumerable<string> lines)
  18. {
  19. /*
  20.   * Do not make any changes outside this method.
  21.   *
  22.   * Modify this method to process `array` as indicated
  23.   * in the question. At the end, return a List containing
  24.   * the appropriate values
  25.   *
  26.   * Do not print anything in this method
  27.   *
  28.   * Submit this entire program (not just this function)
  29.   * as your answer
  30.   */
  31. List<String> retVal = new List<String>();
  32. return retVal;
  33. }
  34.  
  35. static void Main(string[] args)
  36. {
  37. try
  38. {
  39. String line;
  40. var inputLines = new List<String>();
  41. while((line = Console.ReadLine()) != null) {
  42. line = line.Trim();
  43. if (line != "")
  44. inputLines.Add(line);
  45. }
  46. var retVal = processData(inputLines);
  47. foreach(var res in retVal)
  48. Console.WriteLine(res);
  49. }
  50. catch (IOException ex)
  51. {
  52. Console.WriteLine(ex.Message);
  53. }
  54. }
  55.  
  56. }
  57. }
  58.  
Success #stdin #stdout 0.02s 15808KB
stdin
Test1
stdout
Standard output is empty