All test cases should be passed
Sample Input 1
true
true
Sample Output 1
Grass Trimmed
Garden Cleaned
Watered Plants
Sample Input 2
true
false
Sample Output 2
Grass Trimmed
Garden Cleaned
Water Hose Pipe Not Found
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
const isGrassTrimmerFound = JSON.parse(readLine());
const isWaterHosePipeFound = JSON.parse(readLine());
/* Write your code here */
const myPromise = async () => {
try {
/* Write your code here */
} catch(error) {
/* Write your code here */
}
};
myPromise();
}
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
const isGrassTrimmerFound = JSON.parse(readLine());
const isWaterHosePipeFound = JSON.parse(readLine());
/* Write your code here */
const myPromise = async () => {
try {
if (isGrassTrimmerFound) {
console.log("Grass Trimmed")
else
console.log("Grass Not Trimmed")
console.log("Garden Cleaned")
if (isWaterHosePipeFound)
console.log("Watered Plants")
else
console.log("Water Hose Pipe Not Found")
} catch(error) {
}
};
myPromise();
}
Comments
Leave a comment