#include <iostream>
using namespace std;
int main(int argc, char** argv) {
int i = 0, input;
//for(cin >> a[i]; a[i]; cin >> a[++i] ) ; ///do nothing
//while(cin >> input) cout << input / 2 << "
"; ///OK
//for(; cin >> input; ) cout << input / 2 << "
"; //OK
for(cin >> input; input; cin >> input) cout << input / 2 << "
"; // 不行
return 0;
}
第三道题把cin >> input放在for循环第三个表达式为何报错复杂度过大, 而把cin >> input放在while或者for循环做判断条件却可以通过. 先谢谢了Thanks♪(・ω・)ノ
using namespace std;
int main(int argc, char** argv) {
int i = 0, input;
//for(cin >> a[i]; a[i]; cin >> a[++i] ) ; ///do nothing
//while(cin >> input) cout << input / 2 << "
"; ///OK
//for(; cin >> input; ) cout << input / 2 << "
"; //OK
for(cin >> input; input; cin >> input) cout << input / 2 << "
"; // 不行
return 0;
}
第三道题把cin >> input放在for循环第三个表达式为何报错复杂度过大, 而把cin >> input放在while或者for循环做判断条件却可以通过. 先谢谢了Thanks♪(・ω・)ノ
2020-01-16
在牛客打卡2天,今天学习:刷题 6 道/代码提交 34 次
全部评论
相关推荐
01-15 20:48
桂林电子科技大学 Web前端 点赞 评论 收藏
分享
2025-12-14 11:43
黑龙江大学 Java
用微笑面对困难:确实比较烂,可以这么修改:加上大学的qs排名,然后大学简介要写一些,然后硕士大学加大加粗,科研经历第一句话都写上在复旦大学时,主要负责xxxx,简历左上角把学校logo写上,建议用复旦大学的简历模板 点赞 评论 收藏
分享
点赞 评论 收藏
分享
查看3道真题和解析