MeetCode
Home
Doubts
Why is my C function not returning the …
Solved
1
49
Ask Doubt
View All Doubts
Solvers Leaderboard
Tutorials
Quiz
All Tests
Leaderboard
My Tasks
User Login
Dark
Enable Notifications
Toggle navigation
Count Coprime With N (Small)
Computer Mathematics
Hard
3 views
Back to Questions
View Answer
0
Previous
Check If LCM Equals Product
Medium
P
Next
No next question
Problem Description
Given n
Input Format
One integer n.
Output Format
One integer count.
Sample Test Case
Input:
9
Output:
6
Constraints
1
Official Solution
Loop k=1..n and count gcd(k,n)==1. Works for small n.
Please
login
to submit solutions and comments.
Solutions (0)
No solutions submitted yet. Be the first!
Discussion (0)
No comments yet. Start the discussion!
Prev
Next
Fullscreen Editor
0 lines • 0 chars
Esc close • Tab indent
No comments yet. Start the discussion!