QOJ.ac

QOJ

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

#22575. Der dumme Kuhcomputer

Statistics

Digital unerfahren, wollten Kühe einen binären Rechner (Basis2, cowmpouter), bauten aber Basis-2! Sie freuten sich über das fehlende Vorzeichenbit.

Stellenwerte von rechts:1,-2,4,-8,16,-32 usw. Zählen ab1:1,110,111,100,101,11010,11011,11000,11001 usw. Negative Zahlen bestehen auch aus1 und0 ohne Vorzeichen. Abwärts ab-1:11,10,1101,1100,1111 usw.

Wandle gewöhnliche Dezimalzahlen in Basis-2 um.

Eingabe

Eine ganze Zahl in-2,000,000,000..2,000,000,000.

Ausgabe

Eingabezahl in Basis-2 ohne führende Nullen.0 ist genau0.

Beispiele

Eingabe 1

-13

Ausgabe 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.