找回密码
 中文实名注册
搜索
楼主: 王嘉佑

请高人2

[复制链接]

21

主题

111

回帖

5230

积分

论坛元老

积分
5230
 楼主| 发表于 2025-8-14 20:20:47 | 显示全部楼层
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
    cin >> n;
    for (int i = 1; i < n + 1; i = n - 1){
    cout << i << endl;
}
return 0;
}

点评

out  发表于 2025-8-17 16:01
超时+1  发表于 2025-8-14 20:21
回复

使用道具 举报

21

主题

111

回帖

5230

积分

论坛元老

积分
5230
 楼主| 发表于 2025-8-14 20:24:31 | 显示全部楼层
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
    cin >> n;
    for (int i = 1; i <= n / 2 - 1; i = i + 1){
    cout << 2 * i << endl;
}
return 0;
}

点评

out  发表于 2025-8-17 16:02
666 红色“×”+1  发表于 2025-8-14 20:25
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 中文实名注册

本版积分规则

快速回复 返回顶部 返回列表