QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22575. 間抜けな牛コンピュータ

Statistics

牛はデジタル技術に不慣れで、二進数(基数2)の計算機(cowmpouter)を作るつもりが基数-2にしました!符号ビットがないので喜びました。

基数-2の桁の重みは右から1,-2,4,-8,16,-32などです。1から数えると1,110,111,100,101,11010,11011,11000,11001など。負数も符号なしの1と0です。-1から減らすと11,10,1101,1100,1111などです。

普通の十進整数を基数-2に変換してください。

入力

-2,000,000,000..2,000,000,000の整数一つ。

出力

基数-2で先頭のゼロなし。0はちょうど0です。

入出力例

入力 1

-13

出力 1

110111

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.