結果

問題 No.83 最大マッチング
ユーザー cielciel
提出日時 2014-12-02 23:24:01
言語 Ruby
(3.2.2)
結果
AC  
実行時間 81 ms / 5,000 ms
コード長 97 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 11,540 KB
実行使用メモリ 15,344 KB
最終ジャッジ日時 2023-09-02 01:02:06
合計ジャッジ時間 1,831 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,316 KB
testcase_01 AC 73 ms
15,292 KB
testcase_02 AC 75 ms
15,344 KB
testcase_03 AC 75 ms
15,140 KB
testcase_04 AC 77 ms
15,164 KB
testcase_05 AC 78 ms
15,108 KB
testcase_06 AC 75 ms
15,140 KB
testcase_07 AC 75 ms
15,160 KB
testcase_08 AC 74 ms
15,216 KB
testcase_09 AC 76 ms
15,140 KB
testcase_10 AC 72 ms
15,300 KB
testcase_11 AC 73 ms
15,056 KB
testcase_12 AC 73 ms
15,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/usr/bin/ruby: warning: shebang line ending with \r may cause problems
Syntax OK

ソースコード

diff #

#!/usr/bin/ruby
n=gets.to_i
r='1'
if n%2==0
	n-=2
else
	r='7'
	n-=3
end
puts r+'1'*(n/2)
0