bo_jwolf卖萌的第一场

内网比赛,重开链接http://acm.hust.edu.cn/vjudge/contest/view.action?cid=36366#overview

题解链接,点击标题

素数基础运用(数论中最为重要的组成部分)

Prime Test

米勒拉宾素数测试的经典运用,目的:养成良好的习惯,积累经典模板

Prime Cuts

Prime Land

Prime Gap

Prime Path

Primary Arithmetic

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>

using namespace std;

const int maxn = 105;
int num1[ maxn ], num2[ maxn ], num[ maxn ]; 
int main(){
	unsigned long long m, n;
	while( scanf( "%lld %lld", &m, &n ) != EOF ){
		if( !m && !n )
			break;
		memset( num1, 0, sizeof( num1 ) );
		memset( num2, 0, sizeof( num2 ) );
		int ans = 0, k1 = 0, k2 = 0;
		while( m ){
			num1[ k1++ ] = m % 10;
			m /= 10;
		}
	//	cout << k1 << endl;
		while( n ){
			num2[ k2++ ] = n % 10;
			n /= 10;
		}
	//	cout << k2 << endl;
		int len = max( k1, k2 );
		int temp = 0;
	//	cout << k1 << k2 << len << endl;
		for( int i = 0; i < len; ++i ){
			temp = num1[ i ] + num2[ i ] + temp;
			if( temp > 9)
				ans++;
			temp /= 10;
			
		}
		if( !ans )
			cout << "No carry operation." << endl;
		else if( ans == 1 )
			cout << ans << " carry operation." << endl;
		else
			cout << ans << " carry operations." << endl;
		//return 0;
	}
	return 0;
}

细节问题;

Biorhythms

中国剩余定理

Ones

同余定理

青蛙的约会

扩展欧几里得

Relatives

欧拉函数


chj解题报告http://blog.csdn.net/chj_zmr/article/details/15088107

ysp解题报告http://www.cnblogs.com/5211314jackrose/


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值