class Main {
static class Player{
String job = "a";
int year = 2023;
int base = 2700;
String[] unDay = new String[30];
public void init(){
unDay[8] = "1";
unDay[9] = "1";
unDay[10] = "1";
unDay[0] = "1";
unDay[30] = "1";
unDay[20] = "1";
unDay[21] = "1";
}
public String getUnDayRemark(){
String remark = "";
List<int> cache = new ArrayList();
for(int i=0;i<unDay.lenght;i++){
if(unDay[i]!="0"){
int day = ((int)i)+1;
cache.add(day);
}
}
int starDay = -1;
int offset = 0;
for(int i = 0;i<cache.size();i++){
if(starDay == -1) {
starDay = cache.get(i);
offset = 0;
continue;
}
offset++;
if(starDay == offset - cache.get(i)){
continue;
}else{
if(offset == 1){
remark += starDay + "日";
}
if(offset > 1){
remark += starDay +"日至"+offset+starDay+"日";
}
}
if(cache.size()-1 != i){
remark+="、";
}
}
}
}
public static void main(String[] args) {
Player p = new Player();
p.init();
System.out.println(p.getUnDayRemark());
}
public static String getRemark(Player player){
return "";
}
}