プログラミングのお題スレ Part3
■ このスレッドは過去ログ倉庫に格納されています
0484デフォルトの名無しさん
2014/04/13(日) 19:23:26.62ID:FjBeXDNH#module
#defcfunc f482 str s_, local s, local count, local c, local max_index, local is_valid
s=s_
dim count, 256
repeat strlen(s)
c=peek(s, cnt)
count(c)++
if max_index!c {
if count(max_index)=count(c) : is_valid=0
if count(max_index)<count(c) : max_index=c : is_valid=1
}
loop
return strf("%c", max_index*is_valid)
#global
mes f482("aabaabbab")
■ このスレッドは過去ログ倉庫に格納されています