简体   繁体   English

当数字在数组中存储为单个数字时,如何划分非常大的数字(10 ^ 100)

[英]How to divide a very large number(10^100), when number is stored as single digits in array

Say there is a very large number, 100 digits which is stored in an array. 假设有一个非常大的数字,100位数字存储在一个数组中。 Now i want to divide this number by another number(say 2) , Can anyone suggest how to do it? 现在我想将这个数字除以另一个数字(比如2),任何人都可以建议怎么做?

Try to do it exactly as you would do that on paper. 尝试完全像在纸上那样做。 For small divisors (as 2) this is an O(d) algorithm (where d is the number of digits) and it is impossible to find anything asymptotically better since you need to check each digit at least once. 对于小除数(如2),这是一个O(d)算法(其中d是数字的位数)并且由于您需要至少检查一次每个数字,因此无法找到渐近更好的任何东西。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将大数除以其他大数 - How to divide large number by other large number 如何将 output 数字的位数作为 integer,哪些数字可以精确地划分另一个数字? - How to output the digits of a number as an integer, which the digits can exact divide the another number? 我如何计算一个非常大的数字,如 c 中的 (1000 digits),并使用数组打印出来 - How can I compute a very big digit number like (1000 digits ) in c , and print it out using array 我如何在 C 中不使用 /10 计算数字中的位数? - How do i count the number of digits in a number not using /10 in C? 如何输入小于 100 的整数作为数字字符数组,output 将其单词形式的数字作为 C 中的字符串输入? - How can I input a whole number less than 100 as a character array of digits and output the number in its word form as a string in C? 如何在C中将非常大的字符串转换为数字? - How to convert very large string to number in C? 如何找到 c 中 int digits 的位数最多为 100 或 1000 位? - How to find the number of digits int digits in c upto 100 or 1000 digits? 将 32 位二进制数拆分为单个数字以存储在数组中 - Splitting a 32-bit binary number into individual digits to be stored in an array 将数字的数字存储在数组中 - storing digits of a number in array 求两个非常大的数与一个非常大的数相乘的模数 - Finding Modulus of multiplication of two very large number with a very large number
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM