1 条题解

  • 0
    @ 2025-11-30 16:26:39

    C :

    #include<stdio.h>
    char s[] = "OOTTFFSSEN";
    
    void test() {
        int d; scanf("%d", &d);
        while( d ) {
            putchar(s[d%10]);
            d /= 10;
        }
        puts("");
    }
    
    int main() {
        int t;
        scanf("%d", &t);
        while( t-- ) test();
        return 0;
    }
    
    

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
        int T;
        cin>>T;
        char a[10]= {'O','O','T','T','F','F','S','S','E','N'};
        while(T--)
        {
            string s;
            cin>>s;
            for(int i = s.size()-1;i >= 0;i--)
            cout<<a[s[i] - '0'];
            cout<<endl;
        }
        return 0;
    }
    
    
    • 1

    信息

    ID
    1242
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者