题解 | #判断季节#

判断季节

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;

}

全部评论

相关推荐

点赞 评论 收藏
分享
合适才能收到offe...:招聘上写这些态度傲慢的就别继续招呼了,你会发现hr和面试官挺神的,本来求职艰难就可能影响一些心态了,你去这种公司面试的话,整个心态会炸的。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务