1 条题解

  • -3
    @ 2023-4-4 17:21:21

    直接全给列出来

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        string x[27]={"zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty","twenty one","twenty two","twenty three","twenty four"},y[7]={"0","0","twenty","thirty","forty","fifty"};
        int h,m;
        cin>>h>>m;
        int x1=m/10,x2=m%10;
        if (m==0)
            cout<<x[h]<<" o'clock";
        else
            if (m<=20)
                cout<<x[h]<<" "<<x[m];
            else
                cout<<x[h]<<" "<<y[x1]<<" "<<x[x2];
        return 0;
    }
    
    • 1

    信息

    ID
    833
    时间
    1000ms
    内存
    512MiB
    难度
    2
    标签
    递交数
    63
    已通过
    40
    上传者