Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

NOCOMMEN - No comment

Your task is to remove all comments from C/C++ program.

There are 2 types of comments:

  • multi-line: /* comment */
  • single-line: // comment

However, You have to remember about the character \ which binds two consecutive lines. For example:

// this is a comment \
that's still a comment

Input

Program written in C/C++ with comments.

Warning: tests may contain characters of Ascii value greater than 127.

Output

The same program but without comments.

Warning: "Exact judge" is used in this problem, so you should not ignore any whitespaces in the output.

Example

Input:
// program which adds two numbers \
sorry... three numbers

#include<stdio.h>

int main(void)
{
int a, b, c;
/*
a - first number
b - second one
c - last but not least
*/
scanf("%d %d %d",&a,&b,&c);
printf("%d\n",a+b+c);
return 0;
}
Output:


#include<stdio.h>

int main(void)
{
int a, b, c;

scanf("%d %d %d",&a,&b,&c);
printf("%d\n",a+b+c);
return 0;
}


Added by:Piotr Kąkol
Date:2011-06-10
Time limit:5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: SCM qobi

hide comments
2011-08-09 19:44:13 Piotr KÄ…kol
Yes, it is.
Yes, whitespace have to be preserved exactly.
Nested comments? Can You give an example?

Moreover: puts("// that's not a comment");
And one more test: printf("%c",'"'/*???*/);
2011-08-09 19:15:36 HWK
What about:
//\
/*
int b;
/**/
Is b defined?

Must whitespace be preserved exactly?

I guess nested comments are forbidden?


Last edit: 2011-08-09 19:23:31
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.