LeetCode Biweekly Contest 23
問題文
省略
省略
C++に変換後のコードはこちら
#define main dummy_main
{}
#undef main
class Solution {
public:
int countLargestGroup(int n) {
int mx, res = 0, cnt[100] = {};
rep(i,100) cnt[i] = 0;
rep(i,1,n+1) cnt[sod(i)]++;
mx = max(cnt(100));
rep(i,100) if(mx==cnt[i]) res++;
return res;
}
};
Current time: 2024年04月24日03時32分01秒
Last modified: 2020年04月10日06時27分55秒 (by laycrs)
Tags: Competitive_Programming_Incomplete LeetCode
トップページに戻る
Logged in as: unknown user (not login)