Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update p001.cpp #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update p001.cpp #127

wants to merge 1 commit into from

Conversation

tigertv
Copy link

@tigertv tigertv commented Feb 12, 2020

Hi!

Make it faster.

How the solution works

No loops. It uses sum of arithmetic progression.

Performance

https://tio.run/ gives that

Real time: 0.340 s
User time: 0.271 s
Sys. time: 0.061 s
CPU share: 97.96 %
Exit code: 0

Make it faster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant