Polite numbers. Politeness. - MATLAB Cody - MATLAB Central

Problem 2595. Polite numbers. Politeness.

Difficulty:Rate

A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a number of nontrivial ways to write n as a sum of two or more consecutive positive integers.

For example 9 = 4+5 = 2+3+4 and politeness of 9 is 2.

Given N return politeness of N.

See also 2593

Solution Stats

40.15% Correct | 59.85% Incorrect
Last Solution submitted on Dec 03, 2024

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
3

Group

Indexing I Image
Indexing I
  • 27 Problems
  • 237 Finishers

Problem Recent Solvers175

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page