×

# Help to solve Minimum Deletion RD19

 0 1 Hi there, I am new in this forum, so please help me with your suggestions.. Earlier today I was trying to solve the problem under "Practice>Beginner" named "Minimum Deletion" tag:RD19 I know it's a smart way to solve this by finding GCD of the numbers but I tried something else. The GCD of the numbers suppose to be 1 if all of them are PRIME numbers, so we just wanna know how many numbers are not prime in the given nembers.. So I write the code which is looking fine to me but after submission it says "Wrong answer" I will appreciate if someone help me to find the bug in my code... //RD19 //Unsolved #include #include int test_case(int ara[], int b); int main() { int a,b,d,e; int i,j; int x,y; scanf("%d",&a); for(j=0;j

 0 Consider the test case 6, 8, 9 the answer should be 0 as you don’t need to delete any numbers to achieve a GCD of 1 altogether. So this is the case of all numbers being Coprime. answered 13 Jun '18, 21:36 3★kool 66●1 accept rate: 100% Thank you so much for your help.... (13 Jun '18, 22:19) hs_santo1★
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×2,701
×16
×6
×1

question asked: 12 Jun '18, 22:01

question was seen: 104 times

last updated: 13 Jun '18, 22:19