結果
| 問題 |
No.2078 魔抜けなパープル
|
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2022-09-25 21:17:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 190 bytes |
| コンパイル時間 | 358 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-12-22 14:23:34 |
| 合計ジャッジ時間 | 10,001 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 TLE * 1 |
ソースコード
for _ in range(int(input())):
x, a = map(int, input().split())
ans = a**2+x
for i in range(2, a+1):
ans = min(ans, (a//i)**2*(i-a%i)+(a//i+1)**2*(a%i)+x*i)
print(ans)
ニックネーム