Copycat


This is a companion discussion topic for the original entry at https://toph.co/p/copycat
1 Like

I need to know how to submit the code. I have submit 100% tested c program code but after submitting its saying wrong.
i have tested my code in many ide.
I need an example of solved probem>
Please send me a solved code of this problem: https://toph.co/p/copycat

1 Like

Hi @SirajBoss, can you share your code here?

1 Like
#include <stdio.h>
int main()
{
    int a;
    printf("Enter a number:");
    scanf("%d",&a);
    printf("Your number is: %d",a);
    return 0;
}
1 Like

@SirajBoss You will have to follow the output specification accurately. You must not print anything extra.

Remove the first printf (printf("Enter a number:");) and remove the extra text from the second printf (printf("Your number is: %d",a); -> printf("%d",a);).

1 Like

Thank you Brother. All problem solved.

2 Likes
import java.util.Scanner;
public class Solution {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println(in.nextInt());
    }
}

whats wrong with this code ?? compilation error why ?

1 Like

@gogleprogramer If you are using the IDE, please rename the class to “solution” (with a lowercase s).

1 Like
#include<iostream>
using namespace std;
int main()
{
[REDACTED]
  return 0;
  }
1 Like

2 posts were split to a new topic: [Dimik OJ] Problem 6

Why is does it keep showing “Compilation Error”?

1 Like

It seems you are submitting C code as C#. C# is a different programming language. What you should choose instead is C11.

2 Likes

@hjr265…Thank U very much

2 Likes

how to solve this problem in php? i am submit the problem, first test case is accepted but second test case showing wrong answer

1 Like

Looks like you have solved it.

1 Like

#include <stdio.h>

int main()
{
int A;
scanf("%d",&A);
printf("%d",A);
return 0;
}
What’s wrong with this code?Showing compilation error

What’s wrong with the submit; It always shows me wrong. Is it necessary to match all the lines and letters with your solutions? There are several methods of fixing that problem. I can’t still find where is the problem. Here’s my code block

while True:
try:
    user_input = input("Number: ")
    converted_input = int(user_input)
    output = 0  # dummy value
    if converted_input < 200000000:
        output = converted_input
        print(output)
        break
    else:
        print("Input can't be bigger than 200000000")
        continue

except ValueError:
    print("Invalid input. Please try again.")
#include <stdio.h>
#include <stdlib.h>

int main()
{
   int number;
   printf("Enter your number: ");
   scanf("%d",&number);
   printf("%d",number);

    return 0;
}

Which programming language is this?
I know this is C .
But in submission there is no option of C.

#include <stdio.h>
#include <stdlib.h>

int main()
{
int number;
printf(“Enter your number: “);
scanf(”%d”,&number);
printf("%d",number);

return 0;

}
Which programming language is this?
I know this is C .
But in submission there is no option of C.
Tell me someone plz/

#include <stdio.h>
#include <stdlib.h>

int main()
{
   int number;
   printf("Enter your number: ");
   scanf("%d",&number);
   printf("%d",number);

    return 0;
}

In which programming language I should submit this?