FZU 1771 Counting in English

1306 단어 sessioninputeach

Counting in English
Time Limit:1s
Memory limit:32M
Accepted Submit:54
Total Submit:74

Problem Description

Given two positive integers a and b, count from a to b, in English.

Input

The first line containst (1 <= t <= 10), the number of test cases followed. Each line contains two strings a and b(1 <= a <= b <= 10), in lowercase.

OutPut

For each test case, count from a to b in a single line. Each two consecutive words should be separated by a single space. Every English word must be in lowercase.

Sample Input

3 
one four
five nine 
ten ten

Sample Output

one two three four
five six seven eight nine
ten
Original: 2009 NIT Cup National Invitation Contest Practice Session
문제 풀이: 물 문제.문자열 정보.#include #include using namespace std; int main() { int n,i,length; string s1,s2; cin>>n; string s="one two three four five six seven eight nine ten "; while (n--) { s1="";s2=""; cin>>s1>>s2; s1=strstr(s.c_str(),s1.c_str()); s2=strstr(s.c_str(),s2.c_str()); length=s1.size()-s2.size(); length+=s2.find_first_of(' ',0); for (i=0;i

좋은 웹페이지 즐겨찾기