結果

問題 No.80 四角形を描こう
ユーザー No
提出日時 2018-01-21 17:32:38
言語 Python3
(3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 219 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 54 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2026-10-07 23:08:36
合計ジャッジ時間 1,897 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 5 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
import math

d = int(input())
if d < 4:
    print(0)
    sys.exit()
    
if d % 2 == 1:
    d -= 1

if d % 4 == 0:
    ans = pow(d / 4,2)
else:
    a = int(math.sqrt(d))
    ans = a * (a + 1)

print(int(ans))
0