acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 竞赛
  • 讨论
  • 团队
  • 商城
登录
注册
题目详情提交记录(0)
  • 超入门题解(数组没学过的集合)

    数组没学过的破防了,咋办啊? 我们去问智慧树,智慧树说:”大于0的数,直接输出!“ 额~~~还是不会! 智慧树说:”小于0的,乘-1!“ 于是有这样一串代码: #include<bits/stdc++.h> using namespace std; double n; int main(){ cin>>n; if(n>0)n+=0; else n*=-1; printf("%.2f",n); return 0; } WA!!! 好像没判断0。 再来! #include<bits/stdc++.h> using namespace std; double n; int main(){ cin>>n; if(n>=0)n+=0; else n*=-1; printf("%.2f",n); return 0; } AC。 代码带走,给个赞吧!点赞一定关注大大!

    userId_undefined
    橙子同学
    时空双修者10月全勤卷王12月全勤卷王枚举·枚举小能手递归·套娃学徒冒泡宗师→排序元老
    31阅读
    4回复
    18点赞
  • 题解

    userId_undefined
    zsy
    秩序白银时空双修者题解仙人快乐小狗BUG超度大师
    21阅读
    0回复
    2点赞
  • 会做

    #include <iostream> #include <cmath> #include <algorithm> using namespace std; int main() { double a; cin>>a; printf("%.2f",fabs(a)); return 0; }

    userId_undefined
    ༺ཌༀ☯在下望川☯ༀད༻
    8月全勤卷王秩序白银时间刺客空间掌握者时空双修者
    14阅读
    0回复
    1点赞
  • 题解 100% AC

    userId_undefined
    飞的智动
    题解仙人秩序白银8月全勤卷王时空双修者出道萌新快乐小狗
    2阅读
    0回复
    1点赞
  • A30752.【条件】【入门】输出绝对值

    userId_undefined
    毛奕程
    分治·分治练习生
    8阅读
    0回复
    0点赞
  • 题解

    #include<bits/stdc++.h> using namespace std; int main(){ double a; cin>>a; if(a<0){ a-=a*2; } printf("%.2lf",a); return 0; }

    userId_undefined
    LS_YZY
    出道萌新时空双修者题解仙人倔强青铜模拟·模拟练习生快乐小狗
    2阅读
    0回复
    0点赞
  • 题解

    userId_undefined
    喵仔牛奶
    8月全勤卷王9月全勤卷王11月全勤卷王小有名气题解仙人GESP5级
    0阅读
    0回复
    0点赞
暂无数据

提交答案之后,这里将显示提交结果~

首页