improt java.util.*;
class Repeat{pubilc static void main(String[] arguments){String sentence="I'm happy.";int count=0;Calendar start=Calendar.getInstance();int startMinute=start.get(Calendar.MINUTE);int startSecond=start.get(Calendar.SECOND);start.roll(Clendar.MINUTE,true);int nextMinute=start.get(Calendar.MINUTE);int nextMinute=start.get(Calendar.SECOND);while(count<1000000){System.out.println(sentence);GregorianCalendar now=new GregorianCalendar();if(now.get(Calendar.MINUTE)>=nextMinute){if(now.get(Calendar.SECOND)>=nextSecond){break;}}count++;}System.out.println("\nI wrote the sentence"+count+"times.");System.out.println("I have learned my lesson.");}}
class Repeat{pubilc static void main(String[] arguments){String sentence="I'm happy.";int count=0;Calendar start=Calendar.getInstance();int startMinute=start.get(Calendar.MINUTE);int startSecond=start.get(Calendar.SECOND);start.roll(Clendar.MINUTE,true);int nextMinute=start.get(Calendar.MINUTE);int nextMinute=start.get(Calendar.SECOND);while(count<1000000){System.out.println(sentence);GregorianCalendar now=new GregorianCalendar();if(now.get(Calendar.MINUTE)>=nextMinute){if(now.get(Calendar.SECOND)>=nextSecond){break;}}count++;}System.out.println("\nI wrote the sentence"+count+"times.");System.out.println("I have learned my lesson.");}}