藍橋杯歷年真題及答案大全,藍橋杯2016年七屆C/C++省賽C組第三題-平方怪圈
題目描述 源代碼 思路: 直接寫一個循環,由題意可知,不管開始取什么值,所以我們可以隨意取一個2 然后進入一個死循環,直接通過輸出看最大的值即可 #include <iostream> using namespace std; int sum(int i){int ans=0;while (i)
时间:2023-12-25  |  阅读:30
藍橋杯歷年真題及答案大全,藍橋杯2017年第八屆C/C++省賽C組第八題-九宮幻方
題目描述 源代碼 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; int f[9]; int b[9]; int a[9]={1,2,3,4,5,6,7,8,9}; int judge[8]; int main() {for (int i = 0; i < 9; ++i) {cin>>f[i];}
时间:2023-12-25  |  阅读:29

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息