結果

問題 No.853 河原の石
ユーザー kawacchu
提出日時 2019-07-26 21:49:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 243 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,864 KB
最終ジャッジ日時 2024-07-02 06:59:38
合計ジャッジ時間 5,642 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other WA * 20 TLE * 1 -- * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int,input().split())

W = abs(W)

ans = 0

ans += max(0, W)

for i in range(H-W,0,-1) :
    ans += 1 + (W-i)//(max(1, i-1)) + ((W-i) % (max(1,i-1)) != 0)
    #print(1 + (W-i)//(max(1, i-1)) + ((W-i) % (max(1,i-1)) != 0))

print(ans)
0