public class MainClass public static void main String args int count f

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
public class MainClass {
public static void main(String[] args) {
int count = 0;
for (int i = 0; i < 1000; i++) {
if ((stepen(2, i) - i) % 7 == 0) count++;
}
System.out.println(count);
}
public static int stepen(int a, int b) {
if (b == 0) return 1;
else {
return a * stepen(a, b - 1);
}
}
}