没什么可说的,水题
代码
#include <cstring>
#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;
string b[]={"twenty","thirty","forty","fifty"};
string a[21]={"zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"};
int main(){
int n,m;
cin >> n >> m;
if(m){
if(n<=20){
cout << a[n] << " ";
}
else{
cout << b[n/10-2] << " " << a[n%10] << " ";
}
if(m<=20){
cout << a[m] << " ";
}
else{
cout << b[m/10-2] << " " << a[m%10];
}
}else{
if(n<=20){
cout << a[n] << " ";
}
else{
cout << b[n/10-2] << " " << a[n%10] << " ";
}
cout << "o'clock";
}
}