//https://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85?tpId=37&&tqId=21299&rp=1&ru=/ta/huawei&qru=/ta/huawei/question-ranking
import java.util.Scanner;
public class Main4 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int number = sc.nextInt();
int sum = number * number * number;
int start = number * (number - 1) + 1;
int[] array = new int[number];
for (int i = 0; i < array.length; i++) {
array[i] = start;
start += 2;
}
for (int i = 0; i < array.length; i++) {
if (i < array.length - 1)
System.out.print(array[i] + "+");
else {
System.out.println(array[i]);
}
}
}
}
}
//https://www.nowcoder.com/practice/22fdeb9610ef426f9505e3ab60164c93?tpId=37&tags=&title=&diffculty=0&judgeStatus=0&rp=1
import java.util.Scanner;
public class Main5 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String str1 = sc.next();
String str2 = sc.next();
int res = 0;
char[] c = str1.toCharArray();
for (int i = 0; i < c.length; i++) {
c[i] = str1.charAt(i);
}
for (int i = 0; i < c.length; i++) {
res = str2.indexOf(c[i]);
if (res == -1) {
break;
}
}
if (res == -1) {
System.out.println("false");
} else {
System.out.println("true");
}
}
}
}
//https://www.nowcoder.com/practice/a30bbc1a0aca4c27b86dd88868de4a4a?tpId=37&&tqId=21269&rp=1&ru=/ta/huawei&qru=/ta/huawei/question-ranking
import java.util.Scanner;
public class Main6 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
String str1 = sc.next();
int k = sc.nextInt();
char[]c=str1.toCharArray();
for(int i=0;i<k;i++) {
c[i] = str1.charAt(i);
}
for(int i=0;i<k;i++) {
System.out.print(c[i]);
}
}
}
}
//https://www.nowcoder.com/practice/7a0da8fc483247ff8800059e12d7caf1?tpId=13&&tqId=11200&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking
import java.util.Scanner;
public class Main7 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(Sum_Solution(n));
}
public static int Sum_Solution(int n) {
if(n>=1){
return n+Sum_Solution(n-1);
}
else
return 0;
}
}
//https://www.nowcoder.com/practice/7960b5038a2142a18e27e4c733855dac?tpId=37&&tqId=21244&rp=1&ru=/ta/huawei&qru=/ta/huawei/question-ranking
import java.util.Scanner;
public class Main8 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
while (sc.hasNext()) {
String key = sc.next();
for(int i=0;i<key.length();i++) {
char c=key.charAt(i);
if(c>='A'&&c<'Z') {
c = (char)(c+'b'-'A');
}
else if(c=='Z') {
c='a';
}
else if (c>='a' && c<='c') {
c = '2';
} else if (c>='d' && c<='f') {
c = '3';
} else if (c>='g' && c<='i') {
c = '4';
} else if (c>='j' && c<='l') {
c = '5';
} else if (c>='m' && c<='o') {
c = '6';
} else if (c>='p' && c<='s') {
c = '7';
} else if (c>='t' && c<='v') {
c = '8';
} else if (c>='w' && c<='z') {
c = '9';
}
sb.append(c);
}
System.out.println(sb.toString().trim());
}
}
}
//https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50?tpId=37&tags=&title=&diffculty=0&judgeStatus=0&rp=1
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main0 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.next();
HashSet<Character> hashSet = new HashSet<>();//建立HashSet对象,将字符存储,去掉重复
char[] c = str.toCharArray();//将字符串转换为字符数组,获取每一个字符存储在HashSet集合中,自动去除重复
for(char kk : c) {//遍历数组,去重
if(kk>0&&kk<127) {
hashSet.add(kk);
}
}
System.out.println(hashSet.size());
}
}
//https://www.nowcoder.com/practice/ba241b85371c409ea01ac0aa1a8d957b?tpId=37&&tqId=21278&rp=1&ru=/ta/huawei&qru=/ta/huawei/question-ranking
import java.util.Scanner;
public class Main1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int x = sc.nextInt();
System.out.println(selsetSeven(x));
}
}
public static int selsetSeven(int x){
int res = 0;
for(int i=7;i<=x;i++) {
if(i%7==0||String.valueOf(i).contains("7")) {//String方法判断是否含有7这个数字
res++;
}
}
return res;
}
}
//https://www.nowcoder.com/practice/253986e66d114d378ae8de2e6c4577c1?tpId=37&&tqId=21232&rp=1&ru=/ta/huawei&qru=/ta/huawei/question-ranking
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main2 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
String str = String.valueOf(number);
char[] c = str.toCharArray();
for(int i=0;i<c.length;i++) {
c[i]=str.charAt(i);
}
for(int i=0;i<c.length/2;i++) {
char temp = c[i];
c[i] = c[c.length-i-1];
c[c.length-i-1]=temp;
}
str = String.valueOf(c);
System.out.println(removeRepeation(str));
}
public static String removeRepeation(String str) {
String str1 = "";
for(int i=0;i<str.length();i++) {
char c = str.charAt(i);
if(str.indexOf(c)==i) {
str1 = str1.concat(String.valueOf(c));
}
}
return str1;
}
}