
笔记
文章平均质量分 87
TQ2
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
大数相乘(C语言)
大数相乘 输入两个很大的数相乘得出结果。 例如: 输入: 86164546164196136413315 14654561525131314584561 输出: 1262703643048229694819656018451010743813829715 #include<stdio.h> #include<string.h> #include<stdlib.h> #define getm(type,len) (type *)malloc(sizeof(type)*le原创 2020-12-07 20:19:52 · 2424 阅读 · 0 评论 -
栈的实现
#include<stdlib.h> #include<stdio.h> #define MAXSIZE 100 #define INSIZE 10 typedef char Elem; typedef struct Stack { Elem *base; Elem *top; int stacksize; }Stack; int initStack(Stack *stac...原创 2020-05-01 16:24:58 · 1521 阅读 · 0 评论 -
求m的n次方(大数)
import java.util.Scanner; public class Main { public static void main(String[] args){ // TODO Auto-generated method stub Scanner in = new Scanner(System.in); int[] nums = new int[50]; int k...原创 2020-03-15 17:29:21 · 4007 阅读 · 0 评论 -
计算n的阶乘(大数)
import java.util.Scanner; public class Main { public static void main(String[] args){ // TODO Auto-generated method stub Scanner in = new Scanner(System.in); // 最大存储位数1000位 int[] nums = new...原创 2020-03-17 11:52:36 · 1877 阅读 · 0 评论 -
生成排序
import java.util.Arrays; public class GenerateSort { private int[] nums; public void getGenerate(int[] nums) { this.nums = nums; while(true) { int index = getSwapIndex(this.nums); i...原创 2020-04-05 15:01:29 · 1659 阅读 · 0 评论 -
插入排序(JAVA)
import java.util.Arrays; public class InsertSort { public static void main(String[] args) { // TODO Auto-generated method stub int[] arr = {8,1,9,5,10,2}; insertSort(arr); System.out.printl...原创 2020-02-03 21:16:08 · 1544 阅读 · 0 评论 -
JAVA吸收换行符(在按行输入字符串中)
例如:输入n个带空格的字符串 Scanner in = new Scanner(System.in); int n = in.nextInt(); String []s = new String [n]; // 定义字符串数组 for(int i=0;i<n;i++) { s[i] = in.nextLine(); // 按行读取 } for(String a:s) ...原创 2020-01-12 15:42:26 · 4020 阅读 · 1 评论