PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000050. Kiểm tra chu kỳ sinh số dư (Uniform Generator)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Kiểm tra chu kỳ sinh số dư (Uniform Generator)
Uniform Generator
Source: UVa
Version: Phuoc Hung OJ Extended
Problem Statement
Consider and . Determine whether this cycle visits all remainders before repetition. Print Good Choice or Bad Choice, using the required numeric column format.
Input
One line contains integers and .
Output
Print Step and Mod right-aligned in fields of width , followed by four spaces and Good Choice or Bad Choice.
Subtasks
- Subtask 1 (20 points):
- Subtask 2 (30 points):
- Subtask 3 (50 points):
Examples
Input
3 5
Output
3 5 Good Choice
Explanation
For step modulo , the cycle is , visiting every remainder.