QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#468897 | #7178. Bishops | embusca# | WA | 0ms | 3580kb | C++20 | 505b | 2024-07-09 02:33:04 | 2024-07-09 02:33:04 |
Judging History
answer
#include "bits/stdc++.h"
using namespace std;
#define endl '\n'
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
typedef long long ll;
int main() {
cin.tie(0)->sync_with_stdio(0);
ll n, m; cin>>n>>m;
ll ma=-1;
for(ll i=1;i<=n;i++){
ma=max(ma,(((m-1)/i)+1)*i);
}
for(ll i=1;i<=m;i++){
ma=max(ma,(((n-1)/i)+1)*i);
}
cout<<ma<<'\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3580kb
input:
2 5
output:
6
result:
wrong output format Unexpected end of file - int32 expected