結果

問題 No.83 最大マッチング
ユーザー takaboujptakaboujp
提出日時 2016-12-20 11:44:43
言語 Ruby
(3.3.0)
結果
AC  
実行時間 519 ms / 5,000 ms
コード長 230 bytes
コンパイル時間 48 ms
コンパイル使用メモリ 11,444 KB
実行使用メモリ 142,044 KB
最終ジャッジ日時 2023-08-21 03:04:42
合計ジャッジ時間 3,293 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,096 KB
testcase_01 AC 80 ms
15,260 KB
testcase_02 AC 78 ms
15,044 KB
testcase_03 AC 81 ms
15,244 KB
testcase_04 AC 81 ms
15,256 KB
testcase_05 AC 83 ms
15,152 KB
testcase_06 AC 81 ms
15,256 KB
testcase_07 AC 81 ms
15,100 KB
testcase_08 AC 81 ms
15,152 KB
testcase_09 AC 103 ms
25,004 KB
testcase_10 AC 337 ms
101,712 KB
testcase_11 AC 513 ms
142,044 KB
testcase_12 AC 519 ms
141,972 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

GET_NUMBER = gets.to_i

output = 0
remaining_match = GET_NUMBER

unless (GET_NUMBER % 2).zero?
  output = 7
  remaining_match -= 3
end

until remaining_match == 0
  output = output * 10 + 1
  remaining_match -= 2
end

puts output
0