题解 | #判断季节#

判断季节

http://www.nowcoder.com/practice/741a9b79fabe474cb153a49b4bff5828

###这里面一个汉字竟然占3个字节,害得我搞了半天,气死我了

include #include using namespace std;

int main() {

int month;
cin >> month;
string chin="春夏秋冬";

if((month-1)/12!=0 || month<1){

// cout <<"*** 案例 滚蛋" << endl; cout <<"不合法" << endl; return 0; }

month/=3;
month+=7;
month%=4;

cout << chin[month*3] << chin[month*3+1] << chin[month*3+2] << "季" << endl; 

// write your code here......
return 0;

}

全部评论

相关推荐

04-18 15:58
已编辑
门头沟学院 设计
kaoyu:这一看就不是计算机的,怎么还有个排斥洗碗?
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务