fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int n = int.Parse(Console.ReadLine());
  8. int a = int.Parse(Console.ReadLine());
  9. int b = int.Parse(Console.ReadLine());
  10. int numbers = 0;
  11.  
  12. for (int i=1; i<=b; i++)
  13. {
  14. int m = i;
  15.  
  16. for (int k=2; k<=n; k++)
  17. {
  18. m *= m;
  19. }
  20. if (m>=a&&m<=b)
  21. {
  22. numbers+=1;
  23. Console.WriteLine(m);
  24. }
  25.  
  26.  
  27. }
  28. Console.WriteLine(numbers);
  29. }
  30. }
Success #stdin #stdout 0.02s 16132KB
stdin
2
48
65

stdout
49
64
2