結果
問題 |
No.80 四角形を描こう
|
ユーザー |
|
提出日時 | 2021-06-10 04:30:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 340 bytes |
コンパイル時間 | 2,050 ms |
コンパイル使用メモリ | 192,804 KB |
最終ジャッジ日時 | 2025-01-22 05:14:15 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 6 WA * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int res = 0; int D; cin >> D; for (int a = 1; a <= D; a++) { for (int b = 1; b <= D; b++) { if (2 * a + 2 * b > D) break; if (2 * a + 2 * b == D) res = max(res, a * b); } } cout << res << '\n'; return 0; }