Menu

Sign in to track your progress and unlock all features.

Theme style

Log in

Problem No 9

Check Multiple of 3 and 5

Easy

10 minute session

Summary

Determine whether a number is a multiple of both 3 and 5.

Problem statement

Given an integer n, return True if n is divisible by both 3 and 5, otherwise return False. This is equivalent to checking divisibility by 15. Handle zero and negative numbers correctly.

Task

Implement a function that returns True when a number is divisible by both 3 and 5 (i.e., divisible by 15).

Examples

Example

Input

15

Output

True

Explanation

15 is divisible by both 3 and 5.

Input format

A single integer n.

Output format

A boolean: True if n is divisible by both 3 and 5, otherwise False.

Constraints

-10**9 <= n <= 10**9. Input will be integer.

Samples

Sample input 0

10

Sample output 0

False

Explanation 0

10 is divisible by 5 but not by 3.

Code editor
Loading editor…

AI assistant

Ask me anything!

Need help? I can explain the core idea behind this problem, review your current code, and give targeted hints. Use “Teach Theory” for the concept, “Get AI hint” for a quick scaffold nudge, or ask a specific question below.

Chat history is temporary and will not be saved.

03:59 AM

Free preview includes 1 Teach Theory response and 1 AI hint per unlocked preview lesson.