Submission #335329

#TimeUsernameProblemLanguageResultExecution timeMemory
335329limabeansChessboard (IZhO18_chessboard)C++17
8 / 100
1 ms492 KiB
#include <bits/stdc++.h> using namespace std; template<typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl using ll = long long; const ll inf = 1e18; const int maxn = 1e6 + 5; ll n,k; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin>>n>>k; assert(!k); ll res = inf; for (int i=1; i<n; i++) { if (n%i==0) { ll black = (n/i)*(n/i)/2; ll cur = i*i*black; res=min(res,cur); } } cout<<res<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...