Shayan's blog

By Shayan, history, 21 month(s) ago, In English
  • Vote: I like it
  • +7
  • Vote: I do not like it

| Write comment?
»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why we ignored ac and bc in ab+ac+bc<=n ??

  • »
    »
    21 month(s) ago, hide # ^ |
    Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    We do not ignore those terms. We just know that it is necessary for ab to be <= n (not sufficient. Therefore, our second loop for b goes to n / a, not n.

»
21 month(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

The E question is almost exactly the same as the "skill upgrade" of the 13th Provincial Competition of the 2022 Blue Bridge Cup, and I have done this question before and memorized the answers in the solution, but I said that I checked the duplicate with other codes, but I don't know those people at all