摘要:
#include<bits/stdc++.h> //求n个数的最小公倍数 #define lcm(a,b) a / gcd(a,b)*b long gcd(long m,long n) { while(n) { long tmp = m % n; m = n; n = tmp; } return m 阅读全文
摘要:
#include<bits/stdc++.h> //发工资 其实就是在数组中求面值数 int main1() { int n ; int a[] = {100,50,10,5,2,1}; int size =sizeof(a) /sizeof(int); int res; int val; whil 阅读全文
摘要:
#include<stdio.h> #include<bits/stdc++.h> //去掉一个最高分和一个最低分,然后计算平均得分 int main1() { int n; int a[101]; int sum; while(scanf("%d",&n)!=EOF) { sum = 0; for 阅读全文