• + 2 comments

    public class Solution {

    public static void main(String[] args) {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int f=1;
        for(int i=1;i<=n;i++)
            {
             f=f*i;
    
     }
                System.out.print(f);
    

    }
    }

    this shows correct ans but still compiler says wrong ans. can anyone help me with it.