解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class C1013 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int n = scanner.nextInt();
int result = function(n);
System.out.println(result);
}
scanner.close();
}
private static int function(int n) {
int sum = 0;
int temp = 2;
for(int i = 1; i <= 5; i++){
sum += temp;
temp = 10*temp+2;
}
return sum;
}
}
0.0分
0 人评分