結果
| 問題 |
No.1229 ラグビーの得点パターン
|
| コンテスト | |
| ユーザー |
abc
|
| 提出日時 | 2021-11-05 13:31:57 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 2,000 ms |
| コード長 | 323 bytes |
| コンパイル時間 | 65 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-06 03:21:39 |
| 合計ジャッジ時間 | 3,777 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 |
コンパイルメッセージ
Main.rb:17: warning: statement not reached Syntax OK
ソースコード
n = gets.to_i cnt = 0 for i in 0..20 do for j in 0..i do k = (n - i * 5 - j * 2).div(3) if (k >= 0) then tmp = i * 5 + j * 2 + k * 3 if (j > i) then next end if (tmp == n) then cnt += 1 next print i print " " print j print " " puts k end end end end p cnt
abc