Problem Description
Loading...
Problem Analysis
At the time I thought
“Still brute force~”
I also thought it was correct just now…
But when I checked, it was TL (time limit exceeded)…
This is how I wrote it at the time:
cpp
| |
Then I rewrote it:
In fact, it is still brute force at heart…
But this time only up to sqrt(N)
However, this causes incorrect output when N is prime
So another check is needed
The AC code is as follows:
cpp
| |
This was their November problem!!!
Problem address: ZZULI 1752 Math Three!