acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 题解

    #include <iostream> using namespace std; int main() { int n; cin >> n; // 读取正整数的个数n int count = 0; // 用于统计美丽数字的数量,初始化为0 for (int i = 0; i < n; i++) { int num; cin >> num; // 依次读取每个正整数 if (num % 9 == 0 && num % 8 != 0) { // 判断是否是9的倍数且不是8的倍数 count++; // 如果是,美丽数字数量加1 } } cout << count << endl; // 输出美丽数字的数量 return 0; }

    userId_undefined

    法兰西玫瑰

    倔强青铜
    51阅读
    0回复
    1点赞
  • 题解

    userId_undefined

    AC

    倔强青铜
    3阅读
    0回复
    1点赞
  • 题解

    #include<iostream> using namespace std; int main(){ int a,v=0,b; cin>>a; for(int i=1;i<=a;i++){ cin>>b; if(b%9==0&&b%8!=0){ v++; } } cout<<v; return 0; }

    userId_undefined

    LS_YZY

    倔强青铜
    6阅读
    0回复
    0点赞
  • python

    userId_undefined

    无敌de鳖佬仔给老爷爷ccb

    秩序白银
    1阅读
    0回复
    0点赞
  • very easy(闭眼做)

    #include<bits/stdc++.h> using namespace std; int main(){ int n,a,cnt=0; cin>>n; for(int i=1;i<=n;i++){ cin>>a; if(a%9==0&&a%8!=0){ cnt++; } } cout<<cnt; return 0; }

    userId_undefined

    智慧达达

    倔强青铜
    1阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    zsy

    秩序白银
    0阅读
    0回复
    0点赞
  • AC答案

    userId_undefined

    AC是最好的

    倔强青铜
    0阅读
    0回复
    0点赞
首页