• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Toughest problem this week

 
Danjel Nyberg
Greenhorn
Posts: 15
Eclipse IDE Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the output of this?



Have a nice weekend everyone!
/Danjel

[John] Split long lines in post
 
Anayonkar Shivalkar
Bartender
Posts: 1557
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Danjel,

Welcome to CodeRanch!

Firstly, this is NotACodeMill. We do not give (and do not encourage giving) ready-made answers.

Secondly, please, ShowSomeEffort. What have you tried to solve this issue so far? Where exactly are you facing issue?

Finally, CarefullyChooseOneForum. I doubt whether this question has anything to do with SCJP/OCPJP.

I hope this helps.
 
Danjel Nyberg
Greenhorn
Posts: 15
Eclipse IDE Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for this, was just spinning off of the recent chars not compiling threads, plus i though i'd give you some fun for the weekend. perhaps the wrong forum.

Kind Regards
/Danjel
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hardly expect it would take anyone a weekend to sysout the Unicode escapes
I'll move this to Programming Diversions for you.
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohh Danjel, are you asking about how to bring the given unicode chars as output, or you ask what is the output on executing this
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12100
30
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
execute it in what? Perl? AWK? Assembly? c-shell?
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be in meaningless drive.
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ankita modi. wrote:It should be in meaningless drive.

I disagree. I think it best suites Programming Diversions - "A place for programming puzzles, challenges, interview questions, and similar fun.", according to its description.
 
Enkita mody
Ranch Hand
Posts: 333
Firefox Browser Java Windows XP
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Jai wrote:
ankita modi. wrote:It should be in meaningless drive.

I disagree. I think it best suites Programming Diversions - "A place for programming puzzles, challenges, interview questions, and similar fun.", according to its description.


Okay, No hurts.It's up to you where you put it.
 
Vijay Tyagi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer is JAVA



Wrote a small program to read those unicode strings from a file and convert each into a char
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijay Tyagi wrote:Answer is JAVA[/code]


\u0053\u0070\u006f\u0069\u006c\u0073\u0070\u006f\u0072\u0074
U3BvaWxzcG9ydA==
;fHYhCiaQ6Ec_
53706f696c73706f7274
394030481481489850528372
 
Vijay Tyagi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richard Tookey wrote:
Vijay Tyagi wrote:Answer is JAVA[/code]


\u0053\u0070\u006f\u0069\u006c\u0073\u0070\u006f\u0072\u0074
U3BvaWxzcG9ydA==
;fHYhCiaQ6Ec_
53706f696c73706f7274
394030481481489850528372





\u0053\u006f\u0072\u0072\u0079\u002c\u0020\u0049\u0020\u0074\u0068\u006f\u0075\u0067\u0068\u0074\u0020\u0069\u0074\u0020\u0077\u0061\u0073\u0020\u0077\u0068\u006f\u0020\u0067\u0065\u0074\u0073\u0020\u0069\u0074\u0020\u0066\u0069\u0072\u0073\u0074
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijay Tyagi wrote:
\u0053\u006f\u0072\u0072\u0079\u002c\u0020\u0049\u0020\u0074\u0068\u006f\u0075\u0067\u0068\u0074\u0020\u0069\u0074\u0020\u0077\u0061\u0073\u0020\u0077\u0068\u006f\u0020\u0067\u0065\u0074\u0073\u0020\u0069\u0074\u0020\u0066\u0069\u0072\u0073\u0074


Oi0pIEkgdGhvdWdodCBpdCBtaWdodCBiZSBzb21lYm9keSdzIGhvbWV3b3JrIQ==
 
Vijay Tyagi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richard Tookey wrote:
Vijay Tyagi wrote:
\u0053\u006f\u0072\u0072\u0079\u002c\u0020\u0049\u0020\u0074\u0068\u006f\u0075\u0067\u0068\u0074\u0020\u0069\u0074\u0020\u0077\u0061\u0073\u0020\u0077\u0068\u006f\u0020\u0067\u0065\u0074\u0073\u0020\u0069\u0074\u0020\u0066\u0069\u0072\u0073\u0074


Oi0pIEkgdGhvdWdodCBpdCBtaWdodCBiZSBzb21lYm9keSdzIGhvbWV3b3JrIQ==



OikgTm8sT1Aga25ldyB0aGUgYW5zd2VyLGhlIHdhbnRlZCB0byBnaXZlIHBlb3BsZSBhICJmdW4gdGFzayIgZm9yIHRoZSB3ZWVrZW5kIQ==
 
Henry Wong
author
Marshal
Pie
Posts: 21016
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you like code obfuscations, take a look at some of the candidates from obfuscation contests -- which are many many orders of magnitude more difficult to decipher than unicode to text.... ... It is really cool looking at code, that generates output that doesn't seem to have any relationship with the original code.

Henry
 
Vijay Tyagi
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which are many many orders of magnitude more difficult to decipher than unicode to text.... ...


Agree , the title of this thread should have been "Easiest problem this week"
 
Dave Trower
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The is in base64.
You can decode it here:
Base 64 decoder
So copy: OikgTm8sT1Aga25ldyB0aGUgYW5zd2VyLGhlIHdhbnRlZCB0byBnaXZlIHBlb3BsZSBhICJmdW4gdGFzayIgZm9yIHRoZSB3ZWVrZW5kIQ==
into the text box and select "decode"
And you get this:
No,OP knew the answer,he wanted to give people a "fun task" for the weekend!
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12100
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
If you like code obfuscations, take a look at some of the candidates from obfuscation contests -- which are many many orders of magnitude more difficult to decipher than unicode to text.... ... It is really cool looking at code, that generates output that doesn't seem to have any relationship with the original code.

I know Perl lets you do some crazy stuff. People have written scripts to translate your source into ASCII art. here is one I made I am particularly proud of. What I posted is a 100% valid perl script you can run.
 
Rohan Deshmkh
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is:
class test { public static void main(String[] args) { System.out.println("JAVA");}}

It was very easy with python.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic