結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー ikdikd
提出日時 2017-06-02 22:53:15
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,149 ms / 2,000 ms
コード長 119 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 11,836 KB
実行使用メモリ 16,168 KB
最終ジャッジ日時 2023-10-22 00:52:36
合計ジャッジ時間 5,186 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
16,168 KB
testcase_01 AC 122 ms
16,168 KB
testcase_02 AC 115 ms
16,168 KB
testcase_03 AC 161 ms
16,168 KB
testcase_04 AC 86 ms
16,060 KB
testcase_05 AC 87 ms
16,060 KB
testcase_06 AC 87 ms
16,060 KB
testcase_07 AC 89 ms
16,060 KB
testcase_08 AC 91 ms
16,060 KB
testcase_09 AC 138 ms
16,168 KB
testcase_10 AC 1,149 ms
16,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i

(1..n).each do |a|
  (a..n).each do |b|
    if b<=n-a-b
      puts "#{a} #{b} #{n-a-b}"
    end
  end
end
0