fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. // your code goes here
  8. int[] thresholds = new int[4] {100, 500, 1000, 1500};
  9. int difficulty = 0;
  10. int score = 0;
  11.  
  12. for (score = 0; score <= 3000; score++) {
  13. for (int x = 0; x < thresholds.Length; x++)
  14. {
  15. if (score % thresholds[x] < score && difficulty < x + 1) {
  16. difficulty = x + 1;
  17. Console.WriteLine("Score: " + score + " Threshold: " + thresholds[x] + " Difficulty: " + difficulty + " Increased difficulty!");
  18. break;
  19. }
  20. }
  21. }
  22. }
  23. }
Success #stdin #stdout 0.04s 33872KB
stdin
Standard input is empty
stdout
Score: 100 Threshold: 100 Difficulty: 1 Increased difficulty!
Score: 500 Threshold: 500 Difficulty: 2 Increased difficulty!
Score: 1000 Threshold: 1000 Difficulty: 3 Increased difficulty!
Score: 1500 Threshold: 1500 Difficulty: 4 Increased difficulty!