#14037: 為甚麼會TLE,求幫改個


julian2001208 (abc)


#include <stdio.h>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int x;
while(true)
{
cin >> x;
if(x%400==0)
{
cout << "閏年" << endl;
}
else
{
cout << "平年" << endl;
}
}
}

#14038: Re:為甚麼會TLE,求幫改個


asnewchien@gmail.com (david)


#include
#include

using namespace std;

int main(int argc, char *argv[])
{
int x;
while(true)
{
cin >> x;
if(x%400==0)
{
cout << "閏年" << endl;
}
else
{
cout << "平年" << endl;
}
}
}


while(cin>>s) 試看看

#14039: Re:為甚麼會TLE,求幫改個


julian2001208 (abc)


#include
#include

using namespace std;

int main(int argc, char *argv[])
{
int x;
while(true)
{
cin >> x;
if(x%400==0)
{
cout << "閏年" << endl;
}
else
{
cout << "平年" << endl;
}
}
}


while(cin>>s) 試看看


謝謝