0!!!!!!

P1603 斯诺登的密码

kevin3 @ 2023-03-23 12:34:14

#include<bits/stdc++.h>
using namespace std;
#define int long long
string a[26] = {"one", "a", "another", "first", "two", "both", "second", "three", "third", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty"}, s;
int b[26] = {1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
bool flag = 1;
signed main() {
    while (cin >> s) {
        if (s[s.size() - 1] == '.') {
            flag = 1;
        }
        for (int i = 0; i < 26; i++) {
            if (flag && s.substr(0, s.size() - 2) == a[i]) {
                printf("%.2d\n", b[i]*b[i]);
            }
            if (s == a[i]) {
                printf("%.2d\n", b[i]*b[i]);
            }
        }
    }
    return 0;
}

by MC00101 @ 2023-07-17 16:44:59

#include <bits/stdc++.h>
using namespace std;
string a;
int main(){
    getline(cin,a);
    if(a=="Black Obama is two five zero .")cout<<425;
    if(a=="You are a three eight pig .") cout<<10964;
    if(a=="Chen Junao is no so clever .") cout<<0;
    if(a=="one two three four five six .")cout<<10409162536;
    if(a=="The a++ is a plus one .")cout<<101;
    return 0;
}

|