10019

Funny Encryption Method

A student from ITESM Campus Monterrey plays with a new encryption method for numbers. These method consist of the following steps: Steps : Example 1. Read the number N to encrypt : M = 265 2. Interpret N as a decimal number : X1 = 265 (decimal) 3. Convert the decimal interpretation of N to its binary representation : X1 = 100001001 (binary) 4. Let b1 be equal to the number of 1’s in this binary representation : b1 = 3 5. Interpret N as a Hexadecimal number : X2 = 265 (hexadecimal) 6. Convert the hexadecimal interpretation of N to its binary representation : X2 = 1001100101 7. Let b2 be equal to the number of 1’s in the last binary representation : b2 = 5 8. The encryption is the result of M xor (b1 ∗ b2) : 265 xor (3*5) = 262 This student failed Computational Organization, thats why this student asked the judges of ITESM Campus Monterrey internal ACM programming Contest to ask for the numbers of 1’s bits of this two representations so that he can continue playing. You have to write a program that read a N umber and give as output the number b1 and b2

Input The first line will contain a number N which is the number of cases that you have to process. Each of the following N Lines (0 < N ≤ 1000) will contain the number M (0 < M ≤ 9999, in decimal representation) which is the number the student wants to encrypt.

Output You will have to output N lines, each containing the number b1 and b2 in that order, separated by one space corresponding to that lines number to crypt

Sample Input 3 265 111 1234

Sample Output 3 5 6 3 5 5

10019 Funny Encryption Method - UVa Online Judge

A student from ITESM Campus Monterrey plays with a new encryption method for numbers. These method consist of the following steps: Steps : Example. 1. Read the number N to encrypt : M = 265. 2. Interpret N as a decimal number : X1 = 265 (decimal). 3. Convert the decimal interpretation of N to its binary representation ...

29KB Sizes 1 Downloads 164 Views

Recommend Documents

10019 Funny Encryption Method - UVa Online Judge
Read the number N to encrypt : M = 265. 2. Interpret N as a decimal number : X1 = 265 (decimal). 3. Convert the decimal interpretation of N to its binary ...

Problem I - UVa Online Judge
Maratona de Programaç˜ao da SBC – ACM ICPC – 2010. 15. Problem I. Come and Go. In a certain city there are N intersections connected by one-way and ...

Encryption Whitepaper
As computers get better and faster, it becomes easier to ... Table 1 details what type of data is encrypted by each G Suite solution. 3. Google encrypts data as it is written to disk with a per-chunk encryption key that is associated .... We compleme

Google Message Encryption
Google Message Encryption service, powered by Postini, provides on-demand message encryption for your organization to securely communicate with business partners and customers according to security policy or on an “as needed” basis. Without the c

UVA-light and Riboflavin.pdf
Page 1 of 2. UVA-light and Riboflavin-mediated. Corneal Collagen Cross-linking. Erik Letko, MD. Parag A. Majmudar, MD. S. Lance Forstot, MD. Randy J. Epstein, MD. Roy S. Rubinfeld, MD. ' Background. Keratoconus and other corneal conditions associated

Ponderaciones UVA 15-16.pdf
KODE ETIK. Nama sumber data atau informan dalam penelitian kualitatif, tidak boleh dicantumkan apabila dapat merugikan informan tersebut. Page 3 of 3. Ponderaciones UVA 15-16.pdf. Ponderaciones UVA 15-16.pdf. Open. Extract. Open with. Sign In. Main m

(>
Miss Peregrine's Home for Peculiar Children (Miss Peregrine's Peculiar Children) ... Library of Souls: The Third Novel of Miss Peregrine's Peculiar Children.

Data Encryption Techniques
his/her computer/ laptop is protected enough because of the anti-virus and router being used, but keeping ... AES has 10 rounds for 128-bit keys, 12 rounds for.

Judge Kozinski.pdf
that the accused had intended to use the ricin he'd developed in his lab as. a biological weapon. Along the way, actual physical evidence was. mishandled by ...

Watch Funny Money (2006) Full Movie Online Free (HD 1080P ...
Watch Funny Money (2006) Full Movie Online Free (HD 1080P Streaming) DVDrip.MP4.pdf. Watch Funny Money (2006) Full Movie Online Free (HD 1080P ...

Watch My Funny Valentine (1974) Full Movie Online Free ...
Watch My Funny Valentine (1974) Full Movie Online Free .Mp4___________.pdf. Watch My Funny Valentine (1974) Full Movie Online Free .Mp4___________.

Watch Ain'T Love Funny (1927) Full Movie Online Free ...
Watch Ain'T Love Funny (1927) Full Movie Online Free .Mp4____________.pdf. Watch Ain'T Love Funny (1927) Full Movie Online Free .Mp4____________.pdf.

Google Message Encryption - Anti-Spam
financial data, medical records, or proprietary corporate information, you simply must secure ... Recipients can view their messages by opening the attachment ...

Online PDF Furiously Happy: A Funny Book About ...
Online PDF Furiously Happy: A Funny Book About Horrible. Things - Full PDF - By Jenny Lawson. Charlie Pierce on all this ESPN nonsense and newspapering ...

Watch Women Aren'T Funny (2014) Full Movie Online Free ...
Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Watch Women Aren'T Funny (2014) Full Movie Online Free .Mp4___________.pdf. Watch Women Aren'T Funny

Judge: Don't Vote!
Apr 28, 2014 - its rank ordering of all (the outputs), then, we claim, the most important paradoxes of the ... George W. Bush, thus making Gore the winner in Florida and so the national winner with 291 electoral college votes to Bush's 246.

Judge Nancy Gertner.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Judge Nancy ...

pdf aes encryption
File: Pdf aes encryption. Download now. Click here if your download doesn't start automatically. Page 1 of 1. pdf aes encryption. pdf aes encryption. Open.

judge loya judgment.pdf
A The Context. 1 In the batch of petitions before this Court, the petitioners seek an inquiry. into the circumstances of the death of Brijgopal Harikishan Loya. He was a. judicial officer in the State of Maharashtra in the rank of a district judge an

Judge Loya Judgment.pdf
Articles on his death were published in the issues of. Caravan magazine dated 20 and 21 November 2017. The first article was titled. “A family breaks its silence ...

judge loya judgment.pdf
Page 1 of 114. 1. IN THE SUPREME COURT OF INDIA. CIVIL/CRIMINAL ORIGINAL JURISDICTION. WRIT PETITION (CIVIL) NO 19 OF 2018. TEHSEEN POONAWALLA ..Petitioner. VERSUS. UNION OF INDIA AND ANR ..Respondents. WITH. WRIT PETITION (CIVIL) NO 20 OF 2018. BAND

Judge Jim Powers
four grown children and four grandsons. J.L. Powers & Associates, LLC Proprietary and Confidential Information. Page 1 of 1. jpowers.pdf. jpowers.pdf. Open.

Fully Homomorphic Encryption Review: Theory ...
system, and secure multiparty computation protocols. Last ... AFei Chen is with Department of Computer Science and Engineering, The Chinese ...... on algebra.