結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 175 ms
25,336 KB
testcase_01 AC 172 ms
25,440 KB
testcase_02 AC 171 ms
25,288 KB
testcase_03 AC 173 ms
25,280 KB
testcase_04 AC 172 ms
25,468 KB
testcase_05 AC 169 ms
25,332 KB
testcase_06 AC 173 ms
25,272 KB
testcase_07 AC 173 ms
25,220 KB
testcase_08 AC 172 ms
25,376 KB
testcase_09 AC 172 ms
25,216 KB
testcase_10 AC 83 ms
15,336 KB
testcase_11 AC 162 ms
17,136 KB
testcase_12 AC 123 ms
16,052 KB
testcase_13 AC 78 ms
15,156 KB
testcase_14 AC 161 ms
17,236 KB
testcase_15 AC 116 ms
16,160 KB
testcase_16 AC 78 ms
15,256 KB
testcase_17 AC 77 ms
15,252 KB
testcase_18 AC 161 ms
17,084 KB
testcase_19 AC 163 ms
17,164 KB
testcase_20 AC 511 ms
25,540 KB
testcase_21 AC 507 ms
25,512 KB
testcase_22 AC 165 ms
25,300 KB
testcase_23 AC 165 ms
25,368 KB
testcase_24 AC 163 ms
25,316 KB
testcase_25 AC 169 ms
25,484 KB
testcase_26 AC 165 ms
25,484 KB
testcase_27 AC 472 ms
25,140 KB
testcase_28 AC 78 ms
15,288 KB
testcase_29 AC 78 ms
15,152 KB
testcase_30 AC 510 ms
25,532 KB
testcase_31 AC 176 ms
25,284 KB
testcase_32 AC 154 ms
25,396 KB
testcase_33 AC 266 ms
25,256 KB
testcase_34 AC 261 ms
25,228 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

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