Help me in solving LJAJAG25 problem

My issue

Output is right so what is problem in my program why it is wrong

My code

#include <stdio.h>
#include <math.h>

int main() {
    int a,b,c,D,root1,root2;
    scanf("%d\n",&a);
    scanf("%d\n",&b);
    scanf("%d\n",&c);
    
    D = b*b - 4*a*c;
    root1 = (-b + sqrt(D))/2*a;
    root2 =(-b - sqrt(D))/2*a;
    printf("%d\n",root1);
    printf("%d",root2);
    return 0;
	// your code goes here

}


Learning course: Learn C Programming
Problem Link: https://www.codechef.com/learn/course/rcpit-programming-c/RCPITLPC09/problems/LJAJAG25