- Code: Select all
int main()
{
int N, expo;
char start = 1;
fscanf (stdin,"%d",&N);
while(1) {
if (fscanf (stdin,"%d",&N) == EOF)
break;
if (start) start = 0;
else printf ("n");
printf ("2^-%d = %.3fE-%dn", ?,?,?); // Spoiler removed :)
}
return 1;
}
Moderator: Board moderators
int main()
{
int N, expo;
char start = 1;
fscanf (stdin,"%d",&N);
while(1) {
if (fscanf (stdin,"%d",&N) == EOF)
break;
if (start) start = 0;
else printf ("n");
printf ("2^-%d = %.3fE-%dn", ?,?,?); // Spoiler removed :)
}
return 1;
}chang wrote:Pls check the output for input=6, output should be 1.563.
I also got WA before handling specially this input.
chang
Users browsing this forum: No registered users and 1 guest