/***
* ━━━━ Code is far away from ━━━━━━
* () ()
* ( ) ( )
* ( ) ( )
* ┏┛┻━━━┛┻┓
* ┃ ━ ┃
* ┃ ┳┛ ┗┳ ┃
* ┃ ┻ ┃
* ┗━┓ ┏━┛
* ┃ ┃
* ┃ ┗━━━┓
* ┃ ┣┓
* ┃ ┏┛
* ┗┓┓┏━┳┓┏┛
* ┃┫┫ ┃┫┫
* ┗┻┛ ┗┻┛
* ━━━━ bug with the more protecting ━━━
* <p/>
* Created by PangHaHa12138 on 2017/6/22.
*/
public class test {
public static void main(String args[]){
String msg1 = "",msg2="",msg3="",msg4="";
String[] arr = new String[]{"过","忘","飘","愛","漫","土","但","长","荪","泥","愿","香",
"夏","闻", "叶","沉","人","未","自","花","盛","草","园","不","夕","是","今"};
int[] index1 = new int[]{20,19,3,12,15,18,14};
int[] index2 = new int[]{21,13,5,23,22,8,9};
int[] index3 = new int[]{7,11,10,6,16,12,1};
int[] index4 = new int[]{24,2,3,27,25,26,17};
for (int i : index1) {
msg1 = arr[i];
}
for (int i : index2) {
msg2 = arr[i];
}
for (int i : index3) {
msg3 = arr[i];
}
for (int i : index4) {
msg4 = arr[i];
}
System.out.println("这首诗是"+msg1+msg2+msg3+msg4);
}
}
网友评论