fork download
  1. using System;
  2.  
  3. public class Test {
  4. public static void Main() {
  5. const int MAX_LENGTH = 30;
  6. String long_string = "dsrgsghhhhhhhtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttthhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhsfgshgfhghfghfghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
  7.  
  8. System.Console.WriteLine((long_string.Length < MAX_LENGTH)
  9. ? long_string
  10. : long_string.Substring(0, MAX_LENGTH));
  11. }
  12. }
Success #stdin #stdout 0.02s 33816KB
stdin
Standard input is empty
stdout
dsrgsghhhhhhhttttttttttttttttt