1 public class Solution 2 { 3 public static void main(String[] args) 4 { 5 int count = 0; 6 7 for(int i = 100; i <= 1000; i++) 8 { 9 if(i % 5 == 0 ^ i % 6 == 0) 10 { 11 System.out.print(i + " "); 12 count++; 13 if(count == 10) 14 { 15 System.out.println(); 16 count = 0; 17 } 18 } 19 } 20 } 21 }
时间: 2024-10-18 05:38:03