結果
問題 |
No.2078 魔抜けなパープル
|
ユーザー |
![]() |
提出日時 | 2022-09-25 22:04:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 336 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-22 14:38:56 |
合計ジャッジ時間 | 11,328 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 5 TLE * 1 |
ソースコード
T=int(input()) for tests in range(T): X,A=map(int,input().split()) ANS=A*(1*1+X) r=A//2 rest=A%2 ANS2=r*(2*2+X)+rest*(1*1+X) ANS=min(ANS,ANS2) for i in range(2,A): r=A//i rest=A-r*i ANS2=(r-rest)*(i*i+X)+rest*((i+1)*(i+1)+X) ANS=min(ANS,ANS2) print(ANS)