I don't know what is wrong with my code! As my both codes produce the same output but one is AC and other is not?

Problem link : https://www.codechef.com/problems/SALARY

first code link : https://www.codechef.com/viewsolution/37121426

second code link: https://www.codechef.com/viewsolution/37121350

1 Like

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Edit:

Also - what Problem are these solutions for?

2 Likes

okk

They produce different output for e.g. the test input:

1                      
3
1 1 10
1 Like

thanks now I know I have to think much about test cases.

1 Like