結果

問題 No.1264 010
ユーザー 👑 horiesinitihoriesiniti
提出日時 2023-02-15 00:58:46
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 204 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 11,340 KB
実行使用メモリ 15,372 KB
最終ジャッジ日時 2023-09-24 11:28:31
合計ジャッジ時間 3,274 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
15,168 KB
testcase_01 AC 75 ms
15,096 KB
testcase_02 AC 71 ms
15,040 KB
testcase_03 AC 72 ms
15,288 KB
testcase_04 AC 78 ms
15,260 KB
testcase_05 AC 78 ms
15,312 KB
testcase_06 AC 76 ms
15,324 KB
testcase_07 WA -
testcase_08 AC 76 ms
15,304 KB
testcase_09 AC 79 ms
15,156 KB
testcase_10 AC 82 ms
15,116 KB
testcase_11 AC 78 ms
15,148 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i
hs=Hash[[0,1,2].zip(["1","010","010010"])]
if n<3 then
	puts hs[n]
else
	s=hs[2].split("")
	3.upto(n){|i|
		if i%2==0 then
			s.unshift("0")
		else
			s.push("0")
		end
	}
	puts s.join("")
end
0