LeetCode Weekly Contest 149
問題文
省略
省略
C++に変換後のコードはこちら
#define main dummy_main
{}
#undef main
class Solution {
public:
int dayOfYear(string date) {
int y, m, d, res=0, i;
y = atoi(date.c_str());
m = atoi(date.c_str()+5);
d = atoi(date.c_str()+8);
rep(i,1,m) res += numOfDaysInMonth(y,i);
res += d;
return res;
}
};
Current time: 2024年05月02日07時02分05秒
Last modified: 2019年08月18日05時19分21秒 (by laycrs)
Tags: Competitive_Programming_Incomplete LeetCode
トップページに戻る
Logged in as: unknown user (not login)