結果

問題 No.944 煎っぞ!
ユーザー 👑 hos.lyrichos.lyric
提出日時 2019-12-11 00:41:56
言語 Ruby
(3.3.0)
結果
AC  
実行時間 516 ms / 3,000 ms
コード長 126 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 11,312 KB
実行使用メモリ 26,288 KB
最終ジャッジ日時 2023-09-06 11:46:47
合計ジャッジ時間 9,618 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 178 ms
26,216 KB
testcase_01 AC 178 ms
26,136 KB
testcase_02 AC 177 ms
26,136 KB
testcase_03 AC 177 ms
26,172 KB
testcase_04 AC 177 ms
26,288 KB
testcase_05 AC 177 ms
26,244 KB
testcase_06 AC 177 ms
26,144 KB
testcase_07 AC 176 ms
26,288 KB
testcase_08 AC 176 ms
26,140 KB
testcase_09 AC 178 ms
26,232 KB
testcase_10 AC 82 ms
15,164 KB
testcase_11 AC 161 ms
17,108 KB
testcase_12 AC 125 ms
16,032 KB
testcase_13 AC 77 ms
15,196 KB
testcase_14 AC 163 ms
17,132 KB
testcase_15 AC 115 ms
15,856 KB
testcase_16 AC 78 ms
15,224 KB
testcase_17 AC 77 ms
15,132 KB
testcase_18 AC 162 ms
17,020 KB
testcase_19 AC 162 ms
17,124 KB
testcase_20 AC 512 ms
26,204 KB
testcase_21 AC 514 ms
26,156 KB
testcase_22 AC 170 ms
26,136 KB
testcase_23 AC 171 ms
26,152 KB
testcase_24 AC 169 ms
26,260 KB
testcase_25 AC 170 ms
26,276 KB
testcase_26 AC 172 ms
26,064 KB
testcase_27 AC 479 ms
25,768 KB
testcase_28 AC 77 ms
15,176 KB
testcase_29 AC 78 ms
15,156 KB
testcase_30 AC 516 ms
26,148 KB
testcase_31 AC 185 ms
26,048 KB
testcase_32 AC 163 ms
26,036 KB
testcase_33 AC 273 ms
26,000 KB
testcase_34 AC 262 ms
25,996 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
a=gets.split.map &:to_i
s=z=0
f={}
n.times{|i|f[s+=a[i]]=1}
1.upto(s){|r|s%r<1&&(1..r).all?{|i|f[s/r*i]}&&z=r}
p z
0