14122022-09-04 20:33:36ncsOszthatóság 31-gyeljuliaMemory limit exceeded 0/503ms3216 KiB
ret=Int[parse(Int,readline())]
while true
  x,r=divrem(ret[end],10)
  x-=3r
  (x<0)&&break
  push!(ret,x)
  (x==0)&&break
end
["IGEN","NEM"][1+(ret[end]%31>0)]|>println
join(ret[2:end]," ")|>println
SubtaskSumTestVerdictTimeMemory
base0/50
1Memory limit exceeded0/03ms1540 KiB
2Memory limit exceeded0/02ms1740 KiB
3Memory limit exceeded0/32ms1892 KiB
4Memory limit exceeded0/32ms1896 KiB
5Memory limit exceeded0/42ms1964 KiB
6Memory limit exceeded0/42ms2020 KiB
7Memory limit exceeded0/42ms2192 KiB
8Memory limit exceeded0/42ms2404 KiB
9Memory limit exceeded0/42ms2416 KiB
10Memory limit exceeded0/42ms2604 KiB
11Memory limit exceeded0/42ms2828 KiB
12Memory limit exceeded0/42ms2972 KiB
13Memory limit exceeded0/42ms3064 KiB
14Memory limit exceeded0/42ms3080 KiB
15Memory limit exceeded0/22ms3216 KiB
16Memory limit exceeded0/22ms3144 KiB