結果

問題 No.944 煎っぞ!
ユーザー yuruhiyayuruhiya
提出日時 2019-12-07 14:00:51
言語 Ruby
(3.3.0)
結果
AC  
実行時間 136 ms / 3,000 ms
コード長 161 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 11,316 KB
実行使用メモリ 22,040 KB
最終ジャッジ日時 2023-08-26 17:19:55
合計ジャッジ時間 5,804 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
21,508 KB
testcase_01 AC 123 ms
21,616 KB
testcase_02 AC 127 ms
21,548 KB
testcase_03 AC 126 ms
21,468 KB
testcase_04 AC 136 ms
21,560 KB
testcase_05 AC 120 ms
21,464 KB
testcase_06 AC 125 ms
21,508 KB
testcase_07 AC 126 ms
21,508 KB
testcase_08 AC 136 ms
21,516 KB
testcase_09 AC 119 ms
21,532 KB
testcase_10 AC 76 ms
15,676 KB
testcase_11 AC 82 ms
16,504 KB
testcase_12 AC 79 ms
15,920 KB
testcase_13 AC 74 ms
15,700 KB
testcase_14 AC 84 ms
16,448 KB
testcase_15 AC 79 ms
15,888 KB
testcase_16 AC 74 ms
15,516 KB
testcase_17 AC 75 ms
15,652 KB
testcase_18 AC 82 ms
16,652 KB
testcase_19 AC 82 ms
16,620 KB
testcase_20 AC 122 ms
22,040 KB
testcase_21 AC 124 ms
21,756 KB
testcase_22 AC 119 ms
21,556 KB
testcase_23 AC 122 ms
21,472 KB
testcase_24 AC 133 ms
21,472 KB
testcase_25 AC 122 ms
21,528 KB
testcase_26 AC 118 ms
21,464 KB
testcase_27 AC 119 ms
21,508 KB
testcase_28 AC 74 ms
15,564 KB
testcase_29 AC 74 ms
15,480 KB
testcase_30 AC 129 ms
21,844 KB
testcase_31 AC 119 ms
21,440 KB
testcase_32 AC 120 ms
21,468 KB
testcase_33 AC 120 ms
21,824 KB
testcase_34 AC 121 ms
21,708 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

gets;a=gets.split.map &:to_i;s=a.sum
(1..s**0.5).to_a.map{|i|s%i==0?[i,s/i]:[]}.flatten.sort.each{|i|x=0;a.each{|b|x+=b;x==i&&x=0;x>i&&break};x==0&&p(s/i)&&exit}
0