[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
Dev Skill Forum • View topic - DCP-2: 6-N-Cryption

DCP-2: 6-N-Cryption

Dev Skill archived problems can be discussed here.

DCP-2: 6-N-Cryption

by rashedul007 » Tue Feb 07, 2017 5:36 pm

Input:

Each test case start with an encrypted number, E. Then the number of keys N(1<N<=10). Then there are N lines of input for the encrypted keys EK( 1< EK < 2^63) Two successive cases are separated by a single new line.
Output:

For each test case, print “Output : O” (without quotation) where O denotes the original data.

In this problem when i type all of my output to check then it becomes successful. But the problem is every time i use

Console.Write("Output: " + OutputNumber + "\n"); Or
Console.Write("Output: " + OutputNumber + Environment.NewLine);

the result gives wrong answer even my program is working with correct outputs. Is there any other way to print newline in C# to meet the need of the devskill program submission?
 
Posts: 10
Joined: Tue Jan 24, 2017 6:25 pm

Re: DCP-2: 6-N-Cryption

by rashedul007 » Tue Feb 07, 2017 5:38 pm

by the way i also checked in uDebug, and it showed the following message

Woohoo! Your output is identical to the accepted output!
 
Posts: 10
Joined: Tue Jan 24, 2017 6:25 pm

Re: DCP-2: 6-N-Cryption

by mahrahat » Thu Feb 09, 2017 1:13 am

Have you tried Console.WriteLine()?
 
Posts: 48
Joined: Thu Nov 24, 2016 9:11 pm
Location: Bangladesh

Re: DCP-2: 6-N-Cryption

by rashedul007 » Tue Feb 14, 2017 12:49 pm

yes, i tried mahrahat
 
Posts: 10
Joined: Tue Jan 24, 2017 6:25 pm

Re: DCP-2: 6-N-Cryption

by rashedul007 » Tue Feb 14, 2017 6:28 pm

 
Posts: 10
Joined: Tue Jan 24, 2017 6:25 pm

Re: DCP-2: 6-N-Cryption

by mahrahat » Tue Feb 14, 2017 10:41 pm

I have just submitted a solution and it has been accepted; seems Console.WriteLine("Output: " + O) produces correct output for me.

So I don't know why you are getting WA. Hope someone else will be able to find the reason. (I have not written ten programs in C# yet in my life!!)
 
Posts: 48
Joined: Thu Nov 24, 2016 9:11 pm
Location: Bangladesh


Who is online
Users browsing this forum: No registered users and 1 guest
cron