Farmer Jan
CodeChefOpen on judge ↗
Farmer Jan has three fields with Tomatoes planted in them. He harvested x tomatoes from the first field, y tomatoes from the second field and is yet to harvest tomatoes from the third field. Feb is very superstitious and believes that if the sum of tomatoes he harvests from the three fields is a prime number (http://en.wikipedia.org/wiki/Prime_number), he'll make a huge profit. Please help him by
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start