题解列表

筛选

编写题解 2779: 输出绝对值

摘要:解题思路:注意事项:参考代码:print('%.2f'%abs(float(input()))) #print('{:.2f}'.format(abs(float(i……

编写题解 2778: 判断数正负

摘要:解题思路:科学计数法的使用,while循环控制范围,不满足用break终止循环注意事项:参考代码:N=int(input()) while N>=-1E9 and N<=1E9:     if N……

编写题解 2764: 带余除法

摘要:解题思路:整除://求余:%注意事项:参考代码:a,b=map(int,input().split()) while b!=0: #当除数非0,进入while循环     print(a//b,a……

编写题解 1267: A+B Problem

摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())#map()方法将字符串转化为整型 print(a+b)……

输入输出练习之第二个数字

摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split()) #map()方法将字符串转化为整数 print(b) #也可以转化为列表,再通过索引获取,如下, #l……

[编程基础]输入输出练习之格式控制

摘要:解题思路:两种方法1.左对齐:&#39;%-8d&#39;%n 。不加-为右对齐(默认)2.&#39;{:<8d}&#39;.format(n)。>为右对齐,d表示十进制。注意事项:参考代码:a,b,……