QOJ.ac

QOJ

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

#22575. 笨拙的牛電腦

Statistics

牛不熟悉數位技術,本想建二進制(基數2)的計算機(是 cowmpouter),卻建成-2進制!很高興,因為-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.