Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Nuttykub
Problemset: Ingredient Validator
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-07 15:08:05
#include <iostream>
using namespace std;
int main(){
string season,moon,ingredient;
cin>>season >> moon >> ingredient;
if(season=="spring" or season=="summer") {
if (moon=="full"){
if (ingredient == "honey" or ingredient == "milk") cout << "Ingredient accepted!";
else cout << "Ingredient rejected!";
}
else if (moon =="new" and ingredient != "chocolate") cout << "Ingredient rejected!";
else cout << "Ingredient accepted!";
}
else {
if(season == "autumn" or season == "winter"){
if(moon == "waning" or moon=="new"){
if(ingredient == "chocolate" or ingredient == "milk") cout << "Ingredient accepted!";
else cout << "Ingredient rejected!";
}
else cout << "Ingredient accepted!";
}
else cout << "Ingredient rejected!";
}
return 0;
}