#include<bits/stdc++.h>
using namespace std;
string temp[27] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty", "a", "both", "another", "first", "second", "third"};
int tempf[27] = {0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 0, 21, 44, 69, 96, 25, 56, 89, 24, 61, 0, 1, 4, 1, 1, 4, 9};
string a[6];
int main() {
bool ll = false, lll = true;
cin >> a[0];
cin >> a[1];
cin >> a[2];
cin >> a[3];
cin >> a[4];
cin >> a[5];
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 27; j++) {
if (a[i] == temp[j] && ll == false) {
cout << tempf[j];
ll = true;
continue;
} else if (a[i] == temp[j]) {
printf("%02d", tempf[j]);
ll = true;
continue;
}
}
}
if (ll == false) {
cout << 0;
}
return 0;
}
第一个事例错了,为啥不能加00???