#include
main()
{
float x,amax,amin;
scanf("%f",&x);
amax=x;amin=x;
while(x>=0)
{
if(x>amax)amax=x;
if(x<amin)amin=x;
scanf("%f",&x);
}
printf("\namax=%f\namin=%f\n",amax,amin);
}...
分类:
其他好文 时间:
2014-07-26 02:07:06
阅读次数:
179
#include
long fun(long num)
{
long k=1;
do
{
k*=num%10;
num/=10;
}
while(num>0);
return k;
}
main()
{
long n;
printf("please enter a number:");
scanf("%ld",&n);
printf("\n%ld\n",fun(n));...
分类:
其他好文 时间:
2014-07-26 02:06:06
阅读次数:
247
代码如下:
#include
#include
int dp[10000];
int max(int a,int b)
{return a>b?a:b;}
int main()
{
int w[4];
int i,j,t,n;
scanf("%d",&t);
w[0]=150,w[2]=200,w[3]=350;
while(t--)
{
...
分类:
其他好文 时间:
2014-07-26 01:57:36
阅读次数:
251
题目描述:输入N个学生的信息,然后进行查询。输入:输入的第一行为N,即学生的个数(Nusing namespace std; //# include# include# include/*int main(){ int n; while (cin >> n) { } ...
分类:
其他好文 时间:
2014-07-26 01:49:16
阅读次数:
223
#include #include #include using namespace std;int main(){double c,h,o,n;int t,i,j;cin>>t;getchar();double ans;char s[100];while (t-->0){gets(s);c=0;h...
分类:
其他好文 时间:
2014-07-26 01:47:46
阅读次数:
248
#include #include int main(){ int n; scanf("%d", &n); char s[100]; while(n--) { scanf("%s", s); int len = strlen(s); ...
分类:
其他好文 时间:
2014-07-26 01:47:36
阅读次数:
147
#include #include #include using namespace std;int main(){ char s[100]; int i,j,n,ans; cin>>n; getchar(); while (n>0) { n--; ...
分类:
其他好文 时间:
2014-07-26 01:46:56
阅读次数:
221
A:hdu4847 字符串匹配第一想法是KMP,写了好长时间结果还TLE了-_-||,实际上用个简单的枚举判断就能解决。因为待验证的字符串"doge"很小。写A题的时候还被输入卡了半天。Tips1:输入至文件结尾(eof)的常用方法: while (cin>>a) //最常用的 while...
分类:
其他好文 时间:
2014-07-26 01:26:26
阅读次数:
271
monkeyrunner在执行device = MonkeyRunner.waitForConnection()一直报错的问题(或者[main] [com.android.chimpchat.adb.AdbChimpDevice] Timeout while trying to create chi...
分类:
移动开发 时间:
2014-07-26 01:01:56
阅读次数:
224
项目中遇到一个问题如题,于是做了个小实验,发现在lock中yield return并不会释放该lock,直到整个迭代器完全执行完或者yield break后才会释放lock。 1 class Program 2 { 3 static object mylock = new o...
分类:
其他好文 时间:
2014-07-26 00:59:56
阅读次数:
464