背景 工作中使用MapReduce任务导出一批含有路径的文件,共计行数300W+,需要检测文件是否在对应的服务器中存在,而文件所在的服务器并非hadoop集群的服务器,因此打算采用bash脚本进行.具体的方法如下(可直接看方法2,方法1效率较低): 2. 采用的方法 a. 方法1 原本打算使用如下脚本,进行简单验证: #!/bin/bash count= cat oriTest.txt | while read data do count=$(( $count+ )) echo $count d
这个相对于两个大整数的运算来说,只能说是,low爆了. 只要利用好除法的性质,这类题便迎刃而解.O(∩_∩)O哈哈~ //大整数除一个int数 #include<iostream> #include<cstdio> #include<cstring> using namespace std; char s[1000],result[1000]; int main() { long long divis; int n,i,k,flag,len; char c; while