fork(1) download
  1. using System;
  2.  
  3. namespace Prob2292
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int n = int.Parse(Console.ReadLine());
  10.  
  11. int count = 0, a = 1;
  12. while (true)
  13. {
  14. count++;
  15. a += 6 * count;
  16. if (n <= a) break;
  17. }
  18.  
  19. Console.WriteLine(count);
  20. }
  21. }
  22. }
Success #stdin #stdout 0.01s 131520KB
stdin
13
stdout
2