Codeforces 535A Tavas and Nafas 水

题意:输出1-99的英文字母

解题思路:哈哈

解题代码:

  1 // File Name: a.cpp
  2 // Author: darkdream
  3 // Created Time: 2015年04月15日 星期三 00时35分13秒
  4
  5 #include<vector>
  6 #include<list>
  7 #include<map>
  8 #include<set>
  9 #include<deque>
 10 #include<stack>
 11 #include<bitset>
 12 #include<algorithm>
 13 #include<functional>
 14 #include<numeric>
 15 #include<utility>
 16 #include<sstream>
 17 #include<iostream>
 18 #include<iomanip>
 19 #include<cstdio>
 20 #include<cmath>
 21 #include<cstdlib>
 22 #include<cstring>
 23 #include<ctime>
 24 #define LL long long
 25
 26 using namespace std;
 27 int n;
 28 char str[][100] = {
 29 "zero",
 30 "one",
 31 "two",
 32 "three",
 33 "four",
 34 "five",
 35 "six",
 36 "seven",
 37 "eight",
 38 "nine",
 39 "ten",
 40 "eleven",
 41 "twelve",
 42 "thirteen",
 43 "fourteen",
 44 "fifteen",
 45 "sixteen",
 46 "seventeen",
 47 "eighteen",
 48 "nineteen",
 49 "twenty",
 50 "twenty-one",
 51 "twenty-two",
 52 "twenty-three",
 53 "twenty-four",
 54 "twenty-five",
 55 "twenty-six",
 56 "twenty-seven",
 57 "twenty-eight",
 58 "twenty-nine",
 59 "thirty",
 60 "thirty-one",
 61 "thirty-two",
 62 "thirty-three",
 63 "thirty-four",
 64 "thirty-five",
 65 "thirty-six",
 66 "thirty-seven",
 67 "thirty-eight",
 68 "thirty-nine",
 69 "forty",
 70 "forty-one",
 71 "forty-two",
 72 "forty-three",
 73 "forty-four",
 74 "forty-five",
 75 "forty-six",
 76 "forty-seven",
 77 "forty-eight",
 78 "forty-nine",
 79 "fifty",
 80 "fifty-one",
 81 "fifty-two",
 82 "fifty-three",
 83 "fifty-four",
 84 "fifty-five",
 85 "fifty-six",
 86 "fifty-seven",
 87 "fifty-eight",
 88 "fifty-nine",
 89 "sixty",
 90 "sixty-one",
 91 "sixty-two",
 92 "sixty-three",
 93 "sixty-four",
 94 "sixty-five",
 95 "sixty-six",
 96 "sixty-seven",
 97 "sixty-eight",
 98 "sixty-nine",
 99 "seventy",
100 "seventy-one",
101 "seventy-two",
102 "seventy-three",
103 "seventy-four",
104 "seventy-five",
105 "seventy-six",
106 "seventy-seven",
107 "seventy-eight",
108 "seventy-nine",
109 "eighty",
110 "eighty-one",
111 "eighty-two",
112 "eighty-three",
113 "eighty-four",
114 "eighty-five",
115 "eighty-six",
116 "eighty-seven",
117 "eighty-eight",
118 "eighty-nine",
119 "ninety",
120 "ninety-one",
121 "ninety-two",
122 "ninety-three",
123 "ninety-four",
124 "ninety-five",
125 "ninety-six",
126 "ninety-seven",
127 "ninety-eight",
128 "ninety-nine"
129 };
130 int main(){
131     scanf("%d",&n);
132     puts(str[n]);
133
134 return 0;
135 }

时间: 2024-11-07 09:36:35

Codeforces 535A Tavas and Nafas 水的相关文章

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

题目传送门 1 /* 2 很简单的水题,晚上累了,刷刷水题开心一下:) 3 */ 4 #include <bits/stdc++.h> 5 using namespace std; 6 7 char s1[11][10] = {"zero", "one", "two", "three", "four", "five", "six", "seven

CodeForces 22C System Administrator 小水怡情 图论+构造

题目链接:点击打开链接 构造一个星形图+一个完全图就好了.. #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <iostream> #include <map> #include <set> #include <math.h> using namespace std; #define inf

CodeForces 707A Brain&#39;s Photos (水题)

题意:给一张照片的像素,让你来确定是黑白的还是彩色的. 析:很简单么,如果有一种颜色不是黑白灰,那么就一定是彩色的. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #i

Codeforces 444C DZY Loves Colors 水线段树

题目链接:点击打开链接 水.. #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <math.h> #include <set> #include <vector> #include <map> using namespace std; #define ll long long #defi

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

题目链接:http://codeforces.com/problemset/problem/535/A #include <iostream> #include <string> using namespace std; int main() { string s1[10]={"zero","one","two","three","four","five",&qu

Codeforces gym 100685 C. Cinderella 水题

C. CinderellaTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/C Description Cinderella is given a task by her Stepmother before she is allowed to go to the Ball. There are N (1 ≤ N ≤ 1000) bottles with water in th

codeforces 710A A. King Moves(水题)

题目链接: A. King Moves 题意: 给出king的位置,问有几个可移动的位置; 思路: 水题,没有思路; AC代码: #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <bits/stdc++.h> #include <stack> #include &l

codeforces 696A Lorenzo Von Matterhorn 水题

这题一眼看就是水题,map随便计 然后我之所以发这个题解,是因为我用了log2()这个函数判断在哪一层 我只能说我真是太傻逼了,这个函数以前听人说有精度问题,还慢,为了图快用的,没想到被坑惨了,以后尽量不用 #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <iostream> #include <algorithm> #

CodeForces 518A Vitaly and Strings (水题,字符串)

题意:给定两个相同长度的字符串,让你找出一个字符串,字典序在两都之间. 析:这个题当时WA了好多次,后来才发现是这么水,我们只要把 s 串加上,然后和算数一样,该进位进位,然后再和 t 比较就行. 代码如下: #include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <set> #include <cstring> #in