import java.util.Scanner;
public class Main {
static String transform(int n){
switch (n){
case 0 : return "zero";
case 1 : return "one";
case 2 : return "two";
case 3 : return "three";
case 4 : return "four";
case 5 : return "five";
case 6 : return "six";
case 7 : return "seven";
case 8 : return "eight";
case 9 : return "nine";
case 10 : return "ten";
case 11 : return "eleven";
case 12 : return "twelve";
case 13 : return "thirteen";
case 14 : return "fourteen";
case 15 : return "fifteen";
case 16 : return "sixteen";
case 17 : return "seventeen";
case 18 : return "eighteen";
case 19 : return "nineteen";
case 20 : return "twenty";
case 30 : return "thirty";
case 40 : return "forty";
case 50 : return "fifty";
default:
int shi = (n/10)*10;
int ge = n%10;
return transform(shi) + " " + transform(ge);
}
}
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int h=scan.nextInt();
int m=scan.nextInt();
if (m==0){
System.out.println(transform(h)+" o'clock");
}
else {
System.out.println(transform(h)+" "+transform(m));
}
}
}
报时助手
最新推荐文章于 2022-05-02 23:02:44 发布