結果

問題 No.269 見栄っ張りの募金活動
ユーザー smz_8110smz_8110
提出日時 2018-08-17 11:35:21
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 154 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 24,320 KB
最終ジャッジ日時 2024-04-16 23:02:41
合計ジャッジ時間 10,794 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
12,288 KB
testcase_01 AC 89 ms
12,288 KB
testcase_02 AC 89 ms
12,160 KB
testcase_03 AC 321 ms
12,672 KB
testcase_04 AC 3,126 ms
16,896 KB
testcase_05 AC 90 ms
12,416 KB
testcase_06 RE -
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N,S,K=gets.split.map &:to_i
n=S-~-N*N*K/2
c=0
1.upto(N){|k|
  t=[1]*n
  2.upto(k){|i|i.upto(n-k){|j|t[j]+=t[j-i]}}
  c=(c+t[n-k])%1000000007
}if n>=0
p c
0