DOJ logoDOJ
Problems
Recently added problemsSaved problems
CategoriesDLCContestsGroupsTeamsBoard
Ranking
Solved Problem RankingStreak rankingDOJ Power ranking
Status
Call for TasksLoginRegister
DOJ logoDOJ

Community online judge with OI-style subtask scoring, Elo ratings, and Discord-backed certification.

Problems
ProblemsCategories
Community
ContestsRankingBoardNoticesHost an external contestGuide
Account
LoginRegisterJudge Status
Policy
Terms of ServiceDLC RulesPrivacyAPI documentationLanguage runtimesContest rank rewardsRating and performance
© 2026 DOJ
All rights reserved
Editorial

ScicomLoveBug

Back to problem

Editorial

There are initially NNN lovebugs, and the number increases by AAA each day. Therefore, during DDD days, the number of additional lovebugs is A×DA \times DA×D.

The answer is N+A×DN + A \times DN+A×D. This value can exceed the range of a 323232-bit integer, so a 646464-bit integer should be used.

Solution written by GPT5.5