結果
| 問題 |
No.80 四角形を描こう
|
| コンテスト | |
| ユーザー |
r_ishida
|
| 提出日時 | 2025-05-09 21:07:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 5,000 ms |
| コード長 | 526 bytes |
| コンパイル時間 | 379 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-05-09 21:07:19 |
| 合計ジャッジ時間 | 1,656 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 8 |
ソースコード
import math
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
d = I()
if d < 4:
print(0)
elif d%4 == 0:
print((d//4)**2)
elif d%4 == 1:
print(((d-1)//4)**2)
elif d%4 == 2:
print(((d-2)//4)*((d-2)//4+1))
elif d%4 == 3:
print(((d-3)//4)*((d-3)//4+1))
r_ishida