AT_abc470_a.Fizz
入门
通过率:0%
时间限制:2.00s
内存限制:1024MB
AC君温馨提醒
该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given a positive integer N.
Output N lines. The i-th line (1≤i≤N) should contain Fizz if i is a multiple of 3, and i if i is not a multiple of 3.
给定一个正整数 N。
输出 N 行。第 i 行(1≤i≤N)应输出 Fizz(当 i 是 3 的倍数时),否则输出 i。
输入格式
The input is given from Standard Input in the following format:
N
输入从标准输入给出,格式如下:
N
输出格式
Output the answer.
输出答案。
输入输出样例
输入#1
4
输出#1
1 2 Fizz 4
输入#2
10
输出#2
1 2 Fizz 4 5 Fizz 7 8 Fizz 10
说明/提示
Sample 1 Explanation:
The first line should contain 1 since 1 is not a multiple of 3.
The second line should contain 2 since 2 is not a multiple of 3.
The third line should contain Fizz since 3 is a multiple of 3.
The fourth line should contain 4 since 4 is not a multiple of 3.
Constraints
- N is an integer between 1 and 100, inclusive.
样例 1 解释:
第一行应输出 1,因为 1 不是 3 的倍数。
第二行应输出 2,因为 2 不是 3 的倍数。
第三行应输出 Fizz,因为 3 是 3 的倍数。
第四行应输出 4,因为 4 不是 3 的倍数。
限制条件
- N 是一个介于 1 和 100(含)之间的整数。
输入解题思路,AI测评打分。不知道怎么写?