编写题解 2778: 判断数正负 摘要:解题思路:科学计数法的使用,while循环控制范围,不满足用break终止循环注意事项:参考代码:N=int(input()) while N>=-1E9 and N<=1E9: if N…… 题解列表 2022年10月18日 0 点赞 0 评论 1582 浏览 评分:9.9
编写题解 2765: 计算分数的浮点数值 摘要:解题思路:保留小数点位数常用方法:1.'%.9f'%n2.'{:.9f}'.format(n)注意事项:参考代码:a,b=map(int,input().split()…… 题解列表 2022年10月18日 3 点赞 0 评论 2222 浏览 评分:9.9
编写题解 2764: 带余除法 摘要:解题思路:整除://求余:%注意事项:参考代码:a,b=map(int,input().split()) while b!=0: #当除数非0,进入while循环 print(a//b,a…… 题解列表 2022年10月18日 0 点赞 0 评论 1315 浏览 评分:9.7
编写题解 2762: 计算(a+b)*c的值 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split()) print((a+b)*c)…… 题解列表 2022年10月18日 0 点赞 0 评论 1169 浏览 评分:9.1
编写题解 1267: A+B Problem 摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())#map()方法将字符串转化为整型 print(a+b)…… 题解列表 2022年10月18日 0 点赞 0 评论 815 浏览 评分:9.3
C++ 类实现 : N个学生类(N<100),每个有属性 学号、姓名、三科成绩。两个成员函数 一个输入数据,一个输出。 摘要:解题思路:注意事项:参考代码:class student{public: string num, name; // 学号、名字 vector<int>v; // …… 题解列表 2022年10月18日 0 点赞 0 评论 461 浏览 评分:0.0
直接面向结果的代码 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a; cin>>a; string b; for(i…… 题解列表 2022年10月18日 0 点赞 0 评论 292 浏览 评分:0.0
编写题解 2749: Hello, World! 摘要:解题思路:注意事项:参考代码:print('Hello, World!') #注意逗号后空一格…… 题解列表 2022年10月17日 0 点赞 0 评论 672 浏览 评分:5.3
输入输出练习之第二个数字 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split()) #map()方法将字符串转化为整数 print(b) #也可以转化为列表,再通过索引获取,如下, #l…… 题解列表 2022年10月17日 0 点赞 0 评论 385 浏览 评分:0.0
[编程基础]输入输出练习之格式控制 摘要:解题思路:两种方法1.左对齐:'%-8d'%n 。不加-为右对齐(默认)2.'{:<8d}'.format(n)。>为右对齐,d表示十进制。注意事项:参考代码:a,b,…… 题解列表 2022年10月17日 0 点赞 0 评论 1327 浏览 评分:9.3