4 条题解

  • 0
    @ 2023-4-23 17:13:41
    #include<stdio.h>
    int main()
    {
    	char num[21][11] = {"zero","one","two","three","four","five","six","seven", 
    	"eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen",
    	"sixteen","seventeen","eighteen","nineteen","twenty"};
    	char min[6][11] = {"ten","twenty","thirty","forty","fifty","sixty"};
        int h,m;
        scanf("%d %d",&h,&m);
        //首先先读“时”
        if (h>20)
            printf("%s %s",num[20],num[h-20]);
        else
            printf("%s",num[h]);
        
        //再读“分”
        if (m==0)
            printf(" o'clock");
        else
        {
            if (m>=20)
            {
                printf(" %s",min[m/10-1]);
                if (m%10!=0)
                    printf(" %s",num[m%10]);
            }
            else
                printf(" %s",num[m]);
        }
    	return 0;
    }
    
    • 0
      @ 2023-1-8 11:47:19
      #include <queue> 
      #include <math.h> 
      #include <stack> 
      #include <stdio.h>
      #include <iostream>
      #include <vector> 
      #include <iomanip> 
      #include <string.h> 
      #include <algorithm>
      using namespace std;
      
      • 0
        @ 2023-1-8 11:46:48

        int main() { int n , m ; cin >> n >> m; cout << a[n] <<" "; if(m == 0) cout <<"o'clock"; else cout << a[m]; return 0; }

        • 0
          @ 2022-2-26 12:05:24
          int main()
          {
          	int n , m ;
          	cin >> n >> m;
          	cout << a[n] <<" ";
          	if(m == 0)
          		cout <<"o'clock";
          	else 
          		cout << a[m];
          	return 0;
          }
          
          • 1

          信息

          ID
          1084
          时间
          1000ms
          内存
          128MiB
          难度
          6
          标签
          递交数
          64
          已通过
          19
          上传者