Tavas and Nafas
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Today Tavas got his test result as an integer score and he wants to share it with his girlfriend, Nafas.

His phone operating system is Tavdroid, and its keyboard doesn't have any digits! He wants to share his score with Nafas via text, so he has no choice but to send this number using words.

He ate coffee mix without water again, so right now he's really messed up and can't think.

Your task is to help him by telling him what to type.

Input

The first and only line of input contains an integer s (0 ≤ s ≤ 99), Tavas's score.

Output

In the first and only line of output, print a single string consisting only from English lowercase letters and hyphens ('-'). Do not use spaces.

Sample test(s)
input
6
output
six
input
99
output
ninety-nine
input
20
output
twenty

英语基础题
#include <iostream>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cctype>
#include <queue>
#include <map>
using namespace std; char HIGH[][] = {"ten","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"};
char TEN[][] = {"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen",
"seventeen","eighteen","nineteen"};
char LOW[][] = {"zero","one","two","three","four","five","six","seven","eight",
"nine"};
int main(void)
{
string s;
int len; while(cin >> s)
{
len = s.size();
if(len == )
cout << LOW[s[] - ''] << endl;
else if(s[] == '')
cout << TEN[s[] - ''] << endl;
else
{
if(s[] == '')
cout << HIGH[s[] - ''] << endl;
else
cout << HIGH[s[] - ''] << '-' << LOW[s[] - ''] << endl;
}
} return ;
}

CF Tavas and Nafas的更多相关文章

  1. Codeforces Round #299 (Div. 2) A. Tavas and Nafas 水题

    A. Tavas and Nafas Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/535/pr ...

  2. 水题 Codeforces Round #299 (Div. 2) A. Tavas and Nafas

    题目传送门 /* 很简单的水题,晚上累了,刷刷水题开心一下:) */ #include <bits/stdc++.h> using namespace std; ][] = {" ...

  3. CF Tavas and Karafs (二分)

    Tavas and Karafs time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  4. 【Codeforces Round #299 (Div. 2) A】 Tavas and Nafas

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 模拟题 [代码] #include <bits/stdc++.h> using namespace std; map & ...

  5. CF535A Tavas and Nafas 题解

    Content 请输出整数 \(s\) 的英文写法. 数据范围:\(0\leqslant s\leqslant 99\). Solution 直接对应打表即可. 当 \(0\leqslant s\le ...

  6. Codeforces Round #299 Div2 解题报告

    这场比赛并没有打现场,昨天晚上做了ABCD四道题,今天做掉了E题 以前还没有过切完一场比赛的所有题呢~爽~ A. Tavas and Nafas   Today Tavas got his test ...

  7. Codeforces Round #299 (Div. 2)A B C 水 dfs 二分

    A. Tavas and Nafas time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  8. CF 535c Tavas and Karafs

    Tavas and Karafs Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u S ...

  9. CF #299 div1 B. Tavas and Malekas KMP-next数组

    题目链接:http://codeforces.com/contest/536/problem/B 一个原始字符串,一个未知字符串,每一次从pos[i]开始覆盖未知字符串,问最后字符串的形式,以及判断过 ...

随机推荐

  1. Java多线程编程之同步器

    同步器 为每种特定的同步问题提供了解决方案 Semaphore Semaphore[信号标:旗语],通过计数器控制对共享资源的访问. 测试类: package concurrent; import c ...

  2. 现代程序设计——homework-09

    Lambda表达式 // homework-09.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <iostream ...

  3. Jvm基础(1)-Java运行时数据区

    最近在看<深入理解Java虚拟机>,里面讲到了Java运行时数据区,这是Jvm基本知识,把读书笔记记录在此.这些知识属于常识,都能查到的,如果我有理解不对的地方,还请指出. 首先把图贴上来 ...

  4. WEB开发框架

  5. 使用friso中文分词注意

    friso是使用c语言开发的一款中文分词器,使用流行的mmseg算法实现.完全基于模块化设计和实现,可以很方便的植入到其他程序中,例如:MySQL,PHP等.目前只支持UTF-8 编码. 源码无需修改 ...

  6. Oracle创建dblink报错:ORA-01017、ORA-02063解决

    Oracle环境:oracle 10.2.0.1 创建的 public dblink 连接oracle 11.2.0.3 ORA-01017: invalid username/password; l ...

  7. C#学习笔记(七):智能编译器

    自动实现属性 C#提供的set/get可以让我们很方便的使用属性,但是某些情况下书写还是稍微麻烦了点,如下: public class Test { private string _name; pub ...

  8. C语言用static限制函数以及全局变量的作用域

    今天才发现这个东西! C语言中没有public private之类的东西. 如果一个函数或者一个全局变量只想在一个.c文件中使用,可以在前面加上static! 以前我还傻傻的每个.c文件中的函数都加一 ...

  9. Codeforces Round #274 (Div. 1) C. Riding in a Lift 前缀和优化dp

    C. Riding in a Lift Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/480/pr ...

  10. [置顶] How to dump redo log entry?

    1.转储针对特定数据块(4号文件的第10-20号数据块)修改的 redo entry select file#,name,blocks from v$datafile;      FILE# NAME ...