| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
刚才跑zoj交了个小题目,一看运行内存,吓死了 800多K,程序只定义了两个变量,怎么回事[程序见内]#include <iostream>
#include <fstream>
using namespace std;
int main (void)
{
#ifndef ONLINE_JUDGE
freopen ("Lowest Bit.txt","r",stdin);
#endif
int input;
int output;
while (cin >> input && input != 0)
{
output = 1;
while ((input & 1) == 0)
{
input >>= 1;
output <<= 1;
}
cout << output << endl;
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator