PJJ彭彭彭


私信TA

用户名:PJJ1997

访问量:58173

签 名:

试试单纯的暴力能暴到多少题

等  级
排  名 52
经  验 11581
参赛次数 10
文章发表 91
年  龄 20
在职情况 学生
学  校 广东药科大学
专  业 计算机科学与技术

  自我简介:

解题思路:





注意事项:





参考代码:

#include <iostream>

#include <deque>

#include <string>

#include <iterator>

#include <numeric>

#include <cmath>

#include <cstdlib>

#include <sstream>

#include <iomanip>

#include <algorithm>

#include <string.h>

using namespace std;


int main(){

int x,y;

cin>>x>>y;

string s1[21]={"zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"};

if(x>=0&&x<=20){

cout<<s1[x]<<" ";

}

if(x>=21&&x<24){

cout<<"twenty"<<" "<<s1[x-20]<<" ";

}

if(y==0){

cout<<"o'clock";

if(y>0&&y<=20){

cout<<s1[y];

}

if(y>=21&&y<=29){

cout<<"twenty"<<" "<<s1[y-20];

}

if(y==30){

cout<<"thirty";

}

if(y>=31&&y<=39){

cout<<"thirty "<<s1[y-30];

}

if(y==40){

cout<<"forty";

}

if(y>=41&&y<=49){

cout<<"forty "<<s1[y-40];

}

if(y==50){

cout<<"fifty ";

}

if(y>=51&&y<60){

cout<<"fifty "<<s1[y-50];

}

return 0;

}      

        


 

0.0分

0 人评分

  评论区

  • «
  • »