# POSSROLL - Editorial

**URL:** <https://discuss.codechef.com/t/possroll-editorial/126001>\
**Category:** editorial\
**Tags:** cakewalk, editorial, start259\
**Created:** [October 7, 2026, 4:58pm UTC](https://discuss.codechef.com/t/possroll-editorial/126001 "2026-10-07T16:58:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceknight1093](https://www.codechef.com/sites/all/themes/abessive/images/user_default_thumb.jpg) [@iceknight1093](https://discuss.codechef.com/u/iceknight1093)\
**Post date:** [October 7, 2026, 4:58pm UTC](https://discuss.codechef.com/t/possroll-editorial/126001/1 "2026-10-07T16:58:05Z")

</div>

# PROBLEM LINK:

[Practice](https://www.codechef.com/problems/POSSROLL)  
[Contest: Division 1](https://www.codechef.com/START259A/problems/POSSROLL)  
[Contest: Division 2](https://www.codechef.com/START259B/problems/POSSROLL)  
[Contest: Division 3](https://www.codechef.com/START259C/problems/POSSROLL)  
[Contest: Division 4](https://www.codechef.com/START259D/problems/POSSROLL)

_ **Author:** _ [nikhil\_010309](https://www.codechef.com/users/nikhil_010309)  
_ **Tester:** _ [raysh07](https://www.codechef.com/users/raysh07)  
_ **Editorialist:** _ [iceknight1093](https://www.codechef.com/users/iceknight1093)

# DIFFICULTY:

Cakewalk

# PREREQUISITES:

None

# PROBLEM:

You have an X-sided die that has the first X multiples of K written on it.  
Given Y, decide if it’s possible for the die to show it when rolled.

# EXPLANATION:

Y can be shown only if it’s among the first X multiples of K.

This means:

1. Y should be a multiple of K, and
2. \frac{Y}{K} should not exceed X.

In most languages, the first condition can be checked as `y % k == 0` and the second condition as `y/k <= x`.  
If both conditions are true, the answer is `Yes`, otherwise the answer is `No`.

# TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

# CODE:

> **Editorialist's code (PyPy3)**
>
> ```python
> x, k, y = map(int, input().split())
> print('Yes' if y%k == 0 and y//k <= x else 'No')
> 
> ```
