公式

A - 化繊のリボン / Synthetic Fiber Ribbon 解説 by admin

swe-2-high

Explanation

Cutting the ribbon into pieces of length \(B\) yields \(\lfloor A/B \rfloor\) pieces with a remainder of \(A \bmod B\) cm. No remainder is left exactly when \(A\) is divisible by \(B\), i.e., \(A \bmod B = 0\).

The program computes \(a \bmod b\) and prints Yes if it is \(0\), otherwise No. A direct modulo check suffices — no simulation of the cutting process is needed.

Complexity

Only two integers are read, so both time and space are \(O(1)\).