Submitted 4 years 8 months 1 day ago
Sat Feb 29 17:05:01 CST 2020
Judger: ZJS
Dataset Version: v0
31 ms /
6920 KB
Final
80
Problem: lss4.dandelion2
Language: GNU C++ 11
1 2 3 4 5 6 7 8 9 10
one two three four five six seven eight nine ten
one two three four five six seven eight nine ten
10 tokens
11 12 13 14 15 16 17 18 19 20
eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty
eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen twenty
10 tokens
21 22 23 24 25 26 27 28 29 30
twenty one twenty two twenty three twenty four twenty five twenty six twenty seven twenty eight twenty nine thirty
twenty one twenty two twenty three twenty four twenty five twenty six twenty seven twenty eight twenty nine thirty
19 tokens
31 32 33 34 35 36 37 38 39 40
thirty one thirty two thirty three thirty four thirty five thirty six thirty seven thirty eight thirty nine forty
thirty one thirty two thirty three thirty four thirty five thirty six thirty seven thirty eight thirty nine fourty
19th words differ - expected: 'fourty', found: 'forty'
41 42 43 44 45 46 47 48 49 50
forty one forty two forty three forty four forty five forty six forty seven forty eight forty nine fifty
fourty one fourty two fourty three fourty four fourty five fourty six fourty seven fourty eight fourty nine fifty
1st words differ - expected: 'fourty', found: 'forty'
51 52 53 54 55 56 57 58 59 60
fifty one fifty two fifty three fifty four fifty five fifty six fifty seven fifty eight fifty nine sixty
fifty one fifty two fifty three fifty four fifty five fifty six fifty seven fifty eight fifty nine sixty
19 tokens
61 62 63 64 65 66 67 68 69 70
sixty one sixty two sixty three sixty four sixty five sixty six sixty seven sixty eight sixty nine seventy
sixty one sixty two sixty three sixty four sixty five sixty six sixty seven sixty eight sixty nine seventy
19 tokens
71 72 73 74 75 76 77 78 79 80
seventy one seventy two seventy three seventy four seventy five seventy six seventy seven seventy eight seventy nine eighty
seventy one seventy two seventy three seventy four seventy five seventy six seventy seven seventy eight seventy nine eighty
19 tokens
81 82 83 84 85 86 87 88 89 90
eighty one eighty two eighty three eighty four eighty five eighty six eighty seven eighty eight eighty nine ninety
eighty one eighty two eighty three eighty four eighty five eighty six eighty seven eighty eight eighty nine ninety
19 tokens
91 92 93 94 95 96 97 98 99 100
ninety one ninety two ninety three ninety four ninety five ninety six ninety seven ninety eight ninety nine one hundred
ninety one ninety two ninety three ninety four ninety five ninety six ninety seven ninety eight ninety nine one hundred
20 tokens
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <string.h>
#include <math.h>
#include <stdio.h>
#include <deque>
#include <bits/stdc++.h>
//#include "testlib.h"
using namespace std;
#define ll long long
#define pii pair<int,int>
#define qi ios::sync_with_stdio(0)
bool debug=true;
/* *************************************
* Written in New Computer *
* The following code belongs to *
* XiaoGeNintendo of HellHoleStudios *
*************************************
*/
template<typename T1,typename T2>ostream& operator<<(ostream& os,pair<T1,T2> ptt){
os<<ptt.first<<","<<ptt.second;
return os;
}
template<typename T>ostream& operator<<(ostream& os,vector<T> vt){
os<<"{";
for(int i=0;i<vt.size();i++){
os<<vt[i]<<" ";
}
os<<"}";
return os;
}
string x[]={"","one","two","three","four","five","six","seven","eight","nine"};
string y[]={"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"};
string z[]={"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"};
int main(){
int n;
while(cin>>n){
if(n<10){
cout<<x[n]<<endl;
}else if(n<20){
cout<<y[n-10]<<endl;
}else if(n==100){
cout<<"one hundred"<<endl;
}else{
cout<<z[n/10-2]<<" "<<x[n%10]<<endl;
}
}
}