北大oj--3980
来源:互联网 发布:oracle数据库最高权限 编辑:程序博客网 时间:2024/05/16 17:06
/*取模运算Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 9753Accepted: 5952Description编写一个C函数mod(int n, int m),实现取模运算%Input输入包含多行数据 每行数据是两个整数a, b (1 <= a, b <= 32767) 数据以EOF结束Output于输入的每一行输出a%bSample Input5 3100 2Sample Output20*///法一: #include <stdio.h>int main(){//unsigned int a,b;//while(scanf("%u%u",&a,&b)==2){//printf("%u\n",a%b); //}int a,b;while(scanf("%d%d",&a,&b)==2){printf("%d\n",a%b);}return 0;}
//法二: #include <stdio.h>int main(){unsigned int a,b;while(scanf("%u%u",&a,&b)==2){while(a>=b){a=a-b;}printf("%d\n",a);}return 0;}
0 0
- 北大oj--3980
- 【北大oj】
- 北大OJ 1001题
- 北大OJ:The Triangle
- 北大OJ 2752
- acm~北大oj分类
- acm~北大oj分类
- 北大oj--3981
- 北大oj--1003
- 北大oj--1004
- 北大oj--1050
- 北大oj--2578
- 北大oj--3624
- 北大oj 1723 SOLDIERS
- 北大 oj 1088 滑雪
- 北大OJ:1003
- 北大OJ:1004
- 北大OJ:1005
- poj 1013
- LDO
- java.lang.NoSuchMethodException: xu.action.product.ProductAction.list()
- POJ 1731 Orders(全排列)
- findViewById中NullPointerException的错误
- 北大oj--3980
- 基变换和图像压缩
- Debian那些事
- 析构函数为什么一般是虚函数
- HDU 2167 Pebbles(状态压缩dp)
- OAF状态管理
- 机房管理系统——vb与excel链接2
- 神奇的卡特兰数
- UVA 10341 Solve It (解方程 二分查找+精度)