結果
| 問題 | No.1229 ラグビーの得点パターン |
| コンテスト | |
| ユーザー |
abc
|
| 提出日時 | 2021-11-05 13:31:57 |
| 言語 | Ruby (4.0.6 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 55 ms / 2,000 ms |
| + 900µs | |
| コード長 | 323 bytes |
| 記録 | |
| コンパイル時間 | 9 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2026-09-19 10:58:30 |
| 合計ジャッジ時間 | 3,502 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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