Skip to main content
deleted 109 characters in body
Source Link
DialFrost
  • 5.1k
  • 2
  • 12
  • 54

If you want to e.g. print all the inputs then we have this, being 64 bytes long:

main(x,y,z){scanf("%*d%d%d%d",&x,&y,&z);printf("%d%d%d",x,y,z);}

We can actually shorten this with a loop, bringing the total down to 47 bytes:

main(z){for(;scanf("%d",&z)>0;)printf("%d",z);}

So the reading part is only 23 bytes long:

for(;scanf("%d",&z)>0;)

Note that this only works when you don't want to assign a value to a specific variable and only want to read the values.

A method that is 29 bytes long:

for(;scanf("%d",&a+i)>0;i++);

Note

This answer is incomplete for now, as I am yet to dive deeper to find better ways to golf it.

Shout out to @mousetail for helping me out!

If you want to e.g. print all the inputs then we have this, being 64 bytes long:

main(x,y,z){scanf("%*d%d%d%d",&x,&y,&z);printf("%d%d%d",x,y,z);}

We can actually shorten this with a loop, bringing the total down to 47 bytes:

main(z){for(;scanf("%d",&z)>0;)printf("%d",z);}

So the reading part is only 23 bytes long:

for(;scanf("%d",&z)>0;)

Note that this only works when you don't want to assign a value to a specific variable and only want to read the values.

A method that is 29 bytes long:

for(;scanf("%d",&a+i)>0;i++);

Note

This answer is incomplete for now, as I am yet to dive deeper to find better ways to golf it.

Shout out to @mousetail for helping me out!

If you want to e.g. print all the inputs then we have this, being 64 bytes long:

main(x,y,z){scanf("%*d%d%d%d",&x,&y,&z);printf("%d%d%d",x,y,z);}

We can actually shorten this with a loop, bringing the total down to 47 bytes:

main(z){for(;scanf("%d",&z)>0;)printf("%d",z);}

So the reading part is only 23 bytes long:

for(;scanf("%d",&z)>0;)

Note that this only works when you don't want to assign a value to a specific variable and only want to read the values.

A method that is 29 bytes long:

for(;scanf("%d",&a+i)>0;i++);

Shout out to @mousetail for helping me out!

added 109 characters in body
Source Link
DialFrost
  • 5.1k
  • 2
  • 12
  • 54

If you want to e.g. print all the inputs then we have this, being 64 bytes long:

main(x,y,z){scanf("%*d%d%d%d",&x,&y,&z);printf("%d%d%d",x,y,z);}

We can actually shorten this with a loop, bringing the total down to 47 bytes:

main(z){for(;scanf("%d",&z)>0;)printf("%d",z);}

So the reading part is only 23 bytes long:

for(;scanf("%d",&z)>0;)

Note that this only works when you don't want to assign a value to a specific variable and only want to read the values.

A method that is 29 bytes long:

for(;scanf("%d",&a+i)>0;i++);

Note

This answer is incomplete for now, as I am yet to dive deeper to find better ways to golf it.

Shout out to @mousetail for helping me out!

If you want to e.g. print all the inputs then we have this, being 64 bytes long:

main(x,y,z){scanf("%*d%d%d%d",&x,&y,&z);printf("%d%d%d",x,y,z);}

We can actually shorten this with a loop, bringing the total down to 47 bytes:

main(z){for(;scanf("%d",&z)>0;)printf("%d",z);}

So the reading part is only 23 bytes long:

for(;scanf("%d",&z)>0;)

Note that this only works when you don't want to assign a value to a specific variable and only want to read the values.

A method that is 29 bytes long:

for(;scanf("%d",&a+i)>0;i++);

Shout out to @mousetail for helping me out!

If you want to e.g. print all the inputs then we have this, being 64 bytes long:

main(x,y,z){scanf("%*d%d%d%d",&x,&y,&z);printf("%d%d%d",x,y,z);}

We can actually shorten this with a loop, bringing the total down to 47 bytes:

main(z){for(;scanf("%d",&z)>0;)printf("%d",z);}

So the reading part is only 23 bytes long:

for(;scanf("%d",&z)>0;)

Note that this only works when you don't want to assign a value to a specific variable and only want to read the values.

A method that is 29 bytes long:

for(;scanf("%d",&a+i)>0;i++);

Note

This answer is incomplete for now, as I am yet to dive deeper to find better ways to golf it.

Shout out to @mousetail for helping me out!

Source Link
DialFrost
  • 5.1k
  • 2
  • 12
  • 54

If you want to e.g. print all the inputs then we have this, being 64 bytes long:

main(x,y,z){scanf("%*d%d%d%d",&x,&y,&z);printf("%d%d%d",x,y,z);}

We can actually shorten this with a loop, bringing the total down to 47 bytes:

main(z){for(;scanf("%d",&z)>0;)printf("%d",z);}

So the reading part is only 23 bytes long:

for(;scanf("%d",&z)>0;)

Note that this only works when you don't want to assign a value to a specific variable and only want to read the values.

A method that is 29 bytes long:

for(;scanf("%d",&a+i)>0;i++);

Shout out to @mousetail for helping me out!