文章

82

粉丝

343

获赞

27

访问

659.6k

头像
这个题可能不只两位数
P1323 浙江大学机试题
发布于2021年3月17日 21:03
阅读数 7.8k

#include <iostream>
#include <string>
using namespace std;

string s;
int f(string s){
    if(s=="zero") return 0;
    if(s=="one") return 1;
    if(s=="two") return 2;
    if(s=="three") return 3;
    if(s=="four") return 4;
    if(s=="five") return 5;
    if(s=="six") return 6;
    if(s=="seven") return 7;
    if(s=="eight") return 8;
    if(s=="nine") return 9;
}
int main(){
    int flag=0;
    int a=0,b=0;
    while(cin>>s){
        if(s=="+"){
            flag=1;
        }
        else if(s=="="){
            flag=0;
            if(a==0&&...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发