1038: [编程入门]宏定义练习之三角形面积-题解(python代码) 解题思路:注意事项:参考代码:importmatha,b,c=map(float,input().split())s=(a+b+c)/2m=math.sqrt((s*(s-a)*(s-b)*(s-c)))print("{:.3f}".format(m)) 题解列表 2021年10月14日 0 点赞 0 评论 654 浏览 评分:7.3
1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:a = int(input())for i in range(2,a//2+1): if a % i == 0: print("not prime")…… 题解列表 2021年10月14日 0 点赞 0 评论 904 浏览 评分:0.0
1036: [编程入门]带参数宏定义练习-题解(python代码) 解题思路:注意事项:参考代码:a,b=map(int,input().split())a,b=b,aprint("{}{}".format(a,b)) 题解列表 2021年10月14日 0 点赞 0 评论 621 浏览 评分:6.0
1041: [编程入门]宏定义之找最大数-题解(python代码) 摘要:解题思路:注意事项:参考代码:a,b,c = map(int,input().split())d = max(a,b,c)print("{:.3f}".format(d))print("{:.3f}"…… 题解列表 2021年10月14日 0 点赞 0 评论 618 浏览 评分:0.0
[编程入门]字符串分类统计,正则4行代码解题思路 摘要:解题思路:利用正则进行匹配注意事项:其他符号由于不好匹配,可采用整个字符串长度减去已知进行求算参考代码:import re strings = input() m, n, p = (len(re.…… 题解列表 2021年10月13日 0 点赞 0 评论 1106 浏览 评分:6.0
简单代码易理解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ char a; int b; float c; double d; scanf("%c %d %f %lf",…… 题解列表 2021年10月13日 0 点赞 0 评论 504 浏览 评分:0.0
只会用for循环 摘要:import java.util.Scanner;public class Main1179 { public static void main(String[] args) { Scanne…… 题解列表 2021年10月13日 0 点赞 0 评论 956 浏览 评分:0.0
枚举 石头剪刀布 `````importjava.util.*;enumGame{ROCK,PAPER,SCISSORS;publicstaticGamegetHand(intindex){Gamehand=null;switch(index){case0:hand=Game.ROCK;break;case1:hand 题解列表 2021年10月13日 0 点赞 0 评论 605 浏览 评分:0.0
自定义函数之字符串反转 摘要:解题思路:先把字符串存入一个数组,再将字符串拆分存放在另一个数组然后倒叙输出即可。注意事项:参考代码:#include<stdio.h>int main(){ int i,x; char…… 题解列表 2021年10月13日 0 点赞 0 评论 682 浏览 评分:9.9
简单清晰代码 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); printf("%-8d%-8d…… 题解列表 2021年10月13日 0 点赞 0 评论 600 浏览 评分:0.0