Print last inputted byteCalculate Standard DeviationGreatest Common DivisorShortest Unique SubstringDouble rotationStringgnirtSStringgnirtSStringgnirtSLet's do the Wave!Does the start equal the end?It was just a bugQuartic SummationI done did made a spaceship maw!

Am I eligible for the Eurail Youth pass? I am 27.5 years old

Using Leaflet inside Bootstrap container?

PTIJ What is the inyan of the Konami code in Uncle Moishy's song?

HP P840 HDD RAID 5 many strange drive failures

Do US professors/group leaders only get a salary, but no group budget?

Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?

What does "^L" mean in C?

How can my new character not be a role-playing handicap to the party?

Asserting that Atheism and Theism are both faith based positions

Is there a term for accumulated dirt on the outside of your hands and feet?

Could Sinn Fein swing any Brexit vote in Parliament?

What if (if any) the reason to buy in small local stores?

How to define limit operations in general topological spaces? Are nets able to do this?

Adding Featured Image in Post List

Is this an example of a Neapolitan chord?

Error message "Cannot index array with string 'Title'" when parsing JSON data with jq

The average age of first marriage in Russia

Do I need to be arrogant to get ahead?

If "dar" means "to give", what does "daros" mean?

What is the term when voters “dishonestly” choose something that they do not want to choose?

Can you move over difficult terrain with only 5' of movement?

Official degrees of earth’s rotation per day

In what cases must I use 了 and in what cases not?

How are passwords stolen from companies if they only store hashes?



Print last inputted byte


Calculate Standard DeviationGreatest Common DivisorShortest Unique SubstringDouble rotationStringgnirtSStringgnirtSStringgnirtSLet's do the Wave!Does the start equal the end?It was just a bugQuartic SummationI done did made a spaceship maw!













1












$begingroup$


Challenge



You have one string of input bytes, output the last byte in it.



Rules



Your submission may be a program or function outputting the last byte in the input which



  • is either a string, stdin or command-line arguments, and

  • is non-empty.

I was trying to solve this with brainfuck, however all languages are allowed to participate. This is code-golf.



Examples



"?" -> "?"
"29845812674" -> "4"









share|improve this question









New contributor




jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    I mean I have input: 29845812674 and output should be: 4
    $endgroup$
    – jean
    2 hours ago







  • 3




    $begingroup$
    Welcome to PPCG! We host competitions on this side which are often answered in esoteric languages, but this is not the right place to ask how to solve a specific problem in a specific language. Such questions belong on Stack overflow, though you should describe what you have already tried and where you are stuck.
    $endgroup$
    – Laikoni
    2 hours ago






  • 1




    $begingroup$
    Welcome, I changed your question to fit our format more properly (note this is what the sandbox is for, usually). However in its current state the challenge is very easy (also in bf), so not sure about that.
    $endgroup$
    – ბიმო
    1 hour ago















1












$begingroup$


Challenge



You have one string of input bytes, output the last byte in it.



Rules



Your submission may be a program or function outputting the last byte in the input which



  • is either a string, stdin or command-line arguments, and

  • is non-empty.

I was trying to solve this with brainfuck, however all languages are allowed to participate. This is code-golf.



Examples



"?" -> "?"
"29845812674" -> "4"









share|improve this question









New contributor




jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$











  • $begingroup$
    I mean I have input: 29845812674 and output should be: 4
    $endgroup$
    – jean
    2 hours ago







  • 3




    $begingroup$
    Welcome to PPCG! We host competitions on this side which are often answered in esoteric languages, but this is not the right place to ask how to solve a specific problem in a specific language. Such questions belong on Stack overflow, though you should describe what you have already tried and where you are stuck.
    $endgroup$
    – Laikoni
    2 hours ago






  • 1




    $begingroup$
    Welcome, I changed your question to fit our format more properly (note this is what the sandbox is for, usually). However in its current state the challenge is very easy (also in bf), so not sure about that.
    $endgroup$
    – ბიმო
    1 hour ago













1












1








1





$begingroup$


Challenge



You have one string of input bytes, output the last byte in it.



Rules



Your submission may be a program or function outputting the last byte in the input which



  • is either a string, stdin or command-line arguments, and

  • is non-empty.

I was trying to solve this with brainfuck, however all languages are allowed to participate. This is code-golf.



Examples



"?" -> "?"
"29845812674" -> "4"









share|improve this question









New contributor




jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




Challenge



You have one string of input bytes, output the last byte in it.



Rules



Your submission may be a program or function outputting the last byte in the input which



  • is either a string, stdin or command-line arguments, and

  • is non-empty.

I was trying to solve this with brainfuck, however all languages are allowed to participate. This is code-golf.



Examples



"?" -> "?"
"29845812674" -> "4"






code-golf string






share|improve this question









New contributor




jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 57 mins ago









SuperJedi224

9,76013363




9,76013363






New contributor




jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 hours ago









jeanjean

61




61




New contributor




jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






jean is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • $begingroup$
    I mean I have input: 29845812674 and output should be: 4
    $endgroup$
    – jean
    2 hours ago







  • 3




    $begingroup$
    Welcome to PPCG! We host competitions on this side which are often answered in esoteric languages, but this is not the right place to ask how to solve a specific problem in a specific language. Such questions belong on Stack overflow, though you should describe what you have already tried and where you are stuck.
    $endgroup$
    – Laikoni
    2 hours ago






  • 1




    $begingroup$
    Welcome, I changed your question to fit our format more properly (note this is what the sandbox is for, usually). However in its current state the challenge is very easy (also in bf), so not sure about that.
    $endgroup$
    – ბიმო
    1 hour ago
















  • $begingroup$
    I mean I have input: 29845812674 and output should be: 4
    $endgroup$
    – jean
    2 hours ago







  • 3




    $begingroup$
    Welcome to PPCG! We host competitions on this side which are often answered in esoteric languages, but this is not the right place to ask how to solve a specific problem in a specific language. Such questions belong on Stack overflow, though you should describe what you have already tried and where you are stuck.
    $endgroup$
    – Laikoni
    2 hours ago






  • 1




    $begingroup$
    Welcome, I changed your question to fit our format more properly (note this is what the sandbox is for, usually). However in its current state the challenge is very easy (also in bf), so not sure about that.
    $endgroup$
    – ბიმო
    1 hour ago















$begingroup$
I mean I have input: 29845812674 and output should be: 4
$endgroup$
– jean
2 hours ago





$begingroup$
I mean I have input: 29845812674 and output should be: 4
$endgroup$
– jean
2 hours ago





3




3




$begingroup$
Welcome to PPCG! We host competitions on this side which are often answered in esoteric languages, but this is not the right place to ask how to solve a specific problem in a specific language. Such questions belong on Stack overflow, though you should describe what you have already tried and where you are stuck.
$endgroup$
– Laikoni
2 hours ago




$begingroup$
Welcome to PPCG! We host competitions on this side which are often answered in esoteric languages, but this is not the right place to ask how to solve a specific problem in a specific language. Such questions belong on Stack overflow, though you should describe what you have already tried and where you are stuck.
$endgroup$
– Laikoni
2 hours ago




1




1




$begingroup$
Welcome, I changed your question to fit our format more properly (note this is what the sandbox is for, usually). However in its current state the challenge is very easy (also in bf), so not sure about that.
$endgroup$
– ბიმო
1 hour ago




$begingroup$
Welcome, I changed your question to fit our format more properly (note this is what the sandbox is for, usually). However in its current state the challenge is very easy (also in bf), so not sure about that.
$endgroup$
– ბიმო
1 hour ago










10 Answers
10






active

oldest

votes


















1












$begingroup$

Brainf***, 7 bytes



,[>,]<.





share|improve this answer









$endgroup$












  • $begingroup$
    ideone.com/XoJLD0 It still doesn't work ;(
    $endgroup$
    – jean
    19 mins ago










  • $begingroup$
    @jean Try it here. (Honestly, I didn't even know ideone did BF).
    $endgroup$
    – SuperJedi224
    15 mins ago











  • $begingroup$
    Yes, in your link everything works fine. But online judge for this problem uses ideone where it doesn't work ;(
    $endgroup$
    – jean
    8 mins ago



















1












$begingroup$


Python 3, 14 bytes





lambda x:x[-1]


Try it online!






share|improve this answer









$endgroup$




















    1












    $begingroup$

    Javascript, 14 bytes



    a=>a.slice(-1)





    share|improve this answer









    $endgroup$




















      1












      $begingroup$

      PowerShell, 11 bytes



      "$args"[-1]


      Try it online!






      share|improve this answer









      $endgroup$




















        1












        $begingroup$


        Jelly, 1 byte



        Ṫ


        Try it online!



        Not the most difficult challenge in Jelly...






        share|improve this answer









        $endgroup$




















          0












          $begingroup$


          Haskell, 9 bytes





          pure.last


          Try it online!






          share|improve this answer









          $endgroup$




















            0












            $begingroup$

            Java 8



            Input from STDIN, 71 bytes



            v->int i=0;for(;System.in.available()>0;i=System.in.read());return i;


            Try it online!



            Function Argument, 25 bytes



            s->s.charAt(s.length()-1)





            share|improve this answer











            $endgroup$




















              0












              $begingroup$

              TI-BASIC (TI-84), 10 bytes



              sub(Ans,length(Ans),1


              Gets the last character in the input string.

              Input is in Ans.

              Output is in Ans and is automatically printed out when the program finishes.





              share









              $endgroup$




















                0












                $begingroup$


                Wolfram Language (Mathematica), 16 bytes



                #~StringTake~-1&


                Try it online!





                share









                $endgroup$




















                  0












                  $begingroup$


                  Befunge-93, 15 bytes



                  >~# :1+_$$$1-,@


                  Try it online!



                  I bet this could be golfed further, but I'm still trying to get the hang of befunge-93.



                  Alternate 15 byte version that is less messy:



                  ~:1+#v!_
                  @,$<


                  Taking strings as input in Befunge isn't the easiest. If there were a single command to take in multiple characters, it would be as simple as reading the string, popping/printing the top character, and exiting.






                  share|improve this answer











                  $endgroup$












                    Your Answer





                    StackExchange.ifUsing("editor", function ()
                    return StackExchange.using("mathjaxEditing", function ()
                    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
                    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
                    );
                    );
                    , "mathjax-editing");

                    StackExchange.ifUsing("editor", function ()
                    StackExchange.using("externalEditor", function ()
                    StackExchange.using("snippets", function ()
                    StackExchange.snippets.init();
                    );
                    );
                    , "code-snippets");

                    StackExchange.ready(function()
                    var channelOptions =
                    tags: "".split(" "),
                    id: "200"
                    ;
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function()
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled)
                    StackExchange.using("snippets", function()
                    createEditor();
                    );

                    else
                    createEditor();

                    );

                    function createEditor()
                    StackExchange.prepareEditor(
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: false,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: null,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader:
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    ,
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    );



                    );






                    jean is a new contributor. Be nice, and check out our Code of Conduct.









                    draft saved

                    draft discarded


















                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f181627%2fprint-last-inputted-byte%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown

























                    10 Answers
                    10






                    active

                    oldest

                    votes








                    10 Answers
                    10






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    1












                    $begingroup$

                    Brainf***, 7 bytes



                    ,[>,]<.





                    share|improve this answer









                    $endgroup$












                    • $begingroup$
                      ideone.com/XoJLD0 It still doesn't work ;(
                      $endgroup$
                      – jean
                      19 mins ago










                    • $begingroup$
                      @jean Try it here. (Honestly, I didn't even know ideone did BF).
                      $endgroup$
                      – SuperJedi224
                      15 mins ago











                    • $begingroup$
                      Yes, in your link everything works fine. But online judge for this problem uses ideone where it doesn't work ;(
                      $endgroup$
                      – jean
                      8 mins ago
















                    1












                    $begingroup$

                    Brainf***, 7 bytes



                    ,[>,]<.





                    share|improve this answer









                    $endgroup$












                    • $begingroup$
                      ideone.com/XoJLD0 It still doesn't work ;(
                      $endgroup$
                      – jean
                      19 mins ago










                    • $begingroup$
                      @jean Try it here. (Honestly, I didn't even know ideone did BF).
                      $endgroup$
                      – SuperJedi224
                      15 mins ago











                    • $begingroup$
                      Yes, in your link everything works fine. But online judge for this problem uses ideone where it doesn't work ;(
                      $endgroup$
                      – jean
                      8 mins ago














                    1












                    1








                    1





                    $begingroup$

                    Brainf***, 7 bytes



                    ,[>,]<.





                    share|improve this answer









                    $endgroup$



                    Brainf***, 7 bytes



                    ,[>,]<.






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 1 hour ago









                    SuperJedi224SuperJedi224

                    9,76013363




                    9,76013363











                    • $begingroup$
                      ideone.com/XoJLD0 It still doesn't work ;(
                      $endgroup$
                      – jean
                      19 mins ago










                    • $begingroup$
                      @jean Try it here. (Honestly, I didn't even know ideone did BF).
                      $endgroup$
                      – SuperJedi224
                      15 mins ago











                    • $begingroup$
                      Yes, in your link everything works fine. But online judge for this problem uses ideone where it doesn't work ;(
                      $endgroup$
                      – jean
                      8 mins ago

















                    • $begingroup$
                      ideone.com/XoJLD0 It still doesn't work ;(
                      $endgroup$
                      – jean
                      19 mins ago










                    • $begingroup$
                      @jean Try it here. (Honestly, I didn't even know ideone did BF).
                      $endgroup$
                      – SuperJedi224
                      15 mins ago











                    • $begingroup$
                      Yes, in your link everything works fine. But online judge for this problem uses ideone where it doesn't work ;(
                      $endgroup$
                      – jean
                      8 mins ago
















                    $begingroup$
                    ideone.com/XoJLD0 It still doesn't work ;(
                    $endgroup$
                    – jean
                    19 mins ago




                    $begingroup$
                    ideone.com/XoJLD0 It still doesn't work ;(
                    $endgroup$
                    – jean
                    19 mins ago












                    $begingroup$
                    @jean Try it here. (Honestly, I didn't even know ideone did BF).
                    $endgroup$
                    – SuperJedi224
                    15 mins ago





                    $begingroup$
                    @jean Try it here. (Honestly, I didn't even know ideone did BF).
                    $endgroup$
                    – SuperJedi224
                    15 mins ago













                    $begingroup$
                    Yes, in your link everything works fine. But online judge for this problem uses ideone where it doesn't work ;(
                    $endgroup$
                    – jean
                    8 mins ago





                    $begingroup$
                    Yes, in your link everything works fine. But online judge for this problem uses ideone where it doesn't work ;(
                    $endgroup$
                    – jean
                    8 mins ago












                    1












                    $begingroup$


                    Python 3, 14 bytes





                    lambda x:x[-1]


                    Try it online!






                    share|improve this answer









                    $endgroup$

















                      1












                      $begingroup$


                      Python 3, 14 bytes





                      lambda x:x[-1]


                      Try it online!






                      share|improve this answer









                      $endgroup$















                        1












                        1








                        1





                        $begingroup$


                        Python 3, 14 bytes





                        lambda x:x[-1]


                        Try it online!






                        share|improve this answer









                        $endgroup$




                        Python 3, 14 bytes





                        lambda x:x[-1]


                        Try it online!







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered 1 hour ago









                        MilkyWay90MilkyWay90

                        511210




                        511210





















                            1












                            $begingroup$

                            Javascript, 14 bytes



                            a=>a.slice(-1)





                            share|improve this answer









                            $endgroup$

















                              1












                              $begingroup$

                              Javascript, 14 bytes



                              a=>a.slice(-1)





                              share|improve this answer









                              $endgroup$















                                1












                                1








                                1





                                $begingroup$

                                Javascript, 14 bytes



                                a=>a.slice(-1)





                                share|improve this answer









                                $endgroup$



                                Javascript, 14 bytes



                                a=>a.slice(-1)






                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered 1 hour ago









                                SuperJedi224SuperJedi224

                                9,76013363




                                9,76013363





















                                    1












                                    $begingroup$

                                    PowerShell, 11 bytes



                                    "$args"[-1]


                                    Try it online!






                                    share|improve this answer









                                    $endgroup$

















                                      1












                                      $begingroup$

                                      PowerShell, 11 bytes



                                      "$args"[-1]


                                      Try it online!






                                      share|improve this answer









                                      $endgroup$















                                        1












                                        1








                                        1





                                        $begingroup$

                                        PowerShell, 11 bytes



                                        "$args"[-1]


                                        Try it online!






                                        share|improve this answer









                                        $endgroup$



                                        PowerShell, 11 bytes



                                        "$args"[-1]


                                        Try it online!







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered 30 mins ago









                                        Gabriel MillsGabriel Mills

                                        594213




                                        594213





















                                            1












                                            $begingroup$


                                            Jelly, 1 byte



                                            Ṫ


                                            Try it online!



                                            Not the most difficult challenge in Jelly...






                                            share|improve this answer









                                            $endgroup$

















                                              1












                                              $begingroup$


                                              Jelly, 1 byte



                                              Ṫ


                                              Try it online!



                                              Not the most difficult challenge in Jelly...






                                              share|improve this answer









                                              $endgroup$















                                                1












                                                1








                                                1





                                                $begingroup$


                                                Jelly, 1 byte



                                                Ṫ


                                                Try it online!



                                                Not the most difficult challenge in Jelly...






                                                share|improve this answer









                                                $endgroup$




                                                Jelly, 1 byte



                                                Ṫ


                                                Try it online!



                                                Not the most difficult challenge in Jelly...







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered 23 mins ago









                                                Nick KennedyNick Kennedy

                                                72137




                                                72137





















                                                    0












                                                    $begingroup$


                                                    Haskell, 9 bytes





                                                    pure.last


                                                    Try it online!






                                                    share|improve this answer









                                                    $endgroup$

















                                                      0












                                                      $begingroup$


                                                      Haskell, 9 bytes





                                                      pure.last


                                                      Try it online!






                                                      share|improve this answer









                                                      $endgroup$















                                                        0












                                                        0








                                                        0





                                                        $begingroup$


                                                        Haskell, 9 bytes





                                                        pure.last


                                                        Try it online!






                                                        share|improve this answer









                                                        $endgroup$




                                                        Haskell, 9 bytes





                                                        pure.last


                                                        Try it online!







                                                        share|improve this answer












                                                        share|improve this answer



                                                        share|improve this answer










                                                        answered 48 mins ago









                                                        flawrflawr

                                                        26.9k665188




                                                        26.9k665188





















                                                            0












                                                            $begingroup$

                                                            Java 8



                                                            Input from STDIN, 71 bytes



                                                            v->int i=0;for(;System.in.available()>0;i=System.in.read());return i;


                                                            Try it online!



                                                            Function Argument, 25 bytes



                                                            s->s.charAt(s.length()-1)





                                                            share|improve this answer











                                                            $endgroup$

















                                                              0












                                                              $begingroup$

                                                              Java 8



                                                              Input from STDIN, 71 bytes



                                                              v->int i=0;for(;System.in.available()>0;i=System.in.read());return i;


                                                              Try it online!



                                                              Function Argument, 25 bytes



                                                              s->s.charAt(s.length()-1)





                                                              share|improve this answer











                                                              $endgroup$















                                                                0












                                                                0








                                                                0





                                                                $begingroup$

                                                                Java 8



                                                                Input from STDIN, 71 bytes



                                                                v->int i=0;for(;System.in.available()>0;i=System.in.read());return i;


                                                                Try it online!



                                                                Function Argument, 25 bytes



                                                                s->s.charAt(s.length()-1)





                                                                share|improve this answer











                                                                $endgroup$



                                                                Java 8



                                                                Input from STDIN, 71 bytes



                                                                v->int i=0;for(;System.in.available()>0;i=System.in.read());return i;


                                                                Try it online!



                                                                Function Argument, 25 bytes



                                                                s->s.charAt(s.length()-1)






                                                                share|improve this answer














                                                                share|improve this answer



                                                                share|improve this answer








                                                                edited 29 mins ago

























                                                                answered 1 hour ago









                                                                Benjamin UrquhartBenjamin Urquhart

                                                                1406




                                                                1406





















                                                                    0












                                                                    $begingroup$

                                                                    TI-BASIC (TI-84), 10 bytes



                                                                    sub(Ans,length(Ans),1


                                                                    Gets the last character in the input string.

                                                                    Input is in Ans.

                                                                    Output is in Ans and is automatically printed out when the program finishes.





                                                                    share









                                                                    $endgroup$

















                                                                      0












                                                                      $begingroup$

                                                                      TI-BASIC (TI-84), 10 bytes



                                                                      sub(Ans,length(Ans),1


                                                                      Gets the last character in the input string.

                                                                      Input is in Ans.

                                                                      Output is in Ans and is automatically printed out when the program finishes.





                                                                      share









                                                                      $endgroup$















                                                                        0












                                                                        0








                                                                        0





                                                                        $begingroup$

                                                                        TI-BASIC (TI-84), 10 bytes



                                                                        sub(Ans,length(Ans),1


                                                                        Gets the last character in the input string.

                                                                        Input is in Ans.

                                                                        Output is in Ans and is automatically printed out when the program finishes.





                                                                        share









                                                                        $endgroup$



                                                                        TI-BASIC (TI-84), 10 bytes



                                                                        sub(Ans,length(Ans),1


                                                                        Gets the last character in the input string.

                                                                        Input is in Ans.

                                                                        Output is in Ans and is automatically printed out when the program finishes.






                                                                        share











                                                                        share


                                                                        share










                                                                        answered 9 mins ago









                                                                        TauTau

                                                                        436210




                                                                        436210





















                                                                            0












                                                                            $begingroup$


                                                                            Wolfram Language (Mathematica), 16 bytes



                                                                            #~StringTake~-1&


                                                                            Try it online!





                                                                            share









                                                                            $endgroup$

















                                                                              0












                                                                              $begingroup$


                                                                              Wolfram Language (Mathematica), 16 bytes



                                                                              #~StringTake~-1&


                                                                              Try it online!





                                                                              share









                                                                              $endgroup$















                                                                                0












                                                                                0








                                                                                0





                                                                                $begingroup$


                                                                                Wolfram Language (Mathematica), 16 bytes



                                                                                #~StringTake~-1&


                                                                                Try it online!





                                                                                share









                                                                                $endgroup$




                                                                                Wolfram Language (Mathematica), 16 bytes



                                                                                #~StringTake~-1&


                                                                                Try it online!






                                                                                share











                                                                                share


                                                                                share










                                                                                answered 7 mins ago









                                                                                shrapshrap

                                                                                1013




                                                                                1013





















                                                                                    0












                                                                                    $begingroup$


                                                                                    Befunge-93, 15 bytes



                                                                                    >~# :1+_$$$1-,@


                                                                                    Try it online!



                                                                                    I bet this could be golfed further, but I'm still trying to get the hang of befunge-93.



                                                                                    Alternate 15 byte version that is less messy:



                                                                                    ~:1+#v!_
                                                                                    @,$<


                                                                                    Taking strings as input in Befunge isn't the easiest. If there were a single command to take in multiple characters, it would be as simple as reading the string, popping/printing the top character, and exiting.






                                                                                    share|improve this answer











                                                                                    $endgroup$

















                                                                                      0












                                                                                      $begingroup$


                                                                                      Befunge-93, 15 bytes



                                                                                      >~# :1+_$$$1-,@


                                                                                      Try it online!



                                                                                      I bet this could be golfed further, but I'm still trying to get the hang of befunge-93.



                                                                                      Alternate 15 byte version that is less messy:



                                                                                      ~:1+#v!_
                                                                                      @,$<


                                                                                      Taking strings as input in Befunge isn't the easiest. If there were a single command to take in multiple characters, it would be as simple as reading the string, popping/printing the top character, and exiting.






                                                                                      share|improve this answer











                                                                                      $endgroup$















                                                                                        0












                                                                                        0








                                                                                        0





                                                                                        $begingroup$


                                                                                        Befunge-93, 15 bytes



                                                                                        >~# :1+_$$$1-,@


                                                                                        Try it online!



                                                                                        I bet this could be golfed further, but I'm still trying to get the hang of befunge-93.



                                                                                        Alternate 15 byte version that is less messy:



                                                                                        ~:1+#v!_
                                                                                        @,$<


                                                                                        Taking strings as input in Befunge isn't the easiest. If there were a single command to take in multiple characters, it would be as simple as reading the string, popping/printing the top character, and exiting.






                                                                                        share|improve this answer











                                                                                        $endgroup$




                                                                                        Befunge-93, 15 bytes



                                                                                        >~# :1+_$$$1-,@


                                                                                        Try it online!



                                                                                        I bet this could be golfed further, but I'm still trying to get the hang of befunge-93.



                                                                                        Alternate 15 byte version that is less messy:



                                                                                        ~:1+#v!_
                                                                                        @,$<


                                                                                        Taking strings as input in Befunge isn't the easiest. If there were a single command to take in multiple characters, it would be as simple as reading the string, popping/printing the top character, and exiting.







                                                                                        share|improve this answer














                                                                                        share|improve this answer



                                                                                        share|improve this answer








                                                                                        edited 2 mins ago

























                                                                                        answered 32 mins ago









                                                                                        JPeroutekJPeroutek

                                                                                        34018




                                                                                        34018




















                                                                                            jean is a new contributor. Be nice, and check out our Code of Conduct.









                                                                                            draft saved

                                                                                            draft discarded


















                                                                                            jean is a new contributor. Be nice, and check out our Code of Conduct.












                                                                                            jean is a new contributor. Be nice, and check out our Code of Conduct.











                                                                                            jean is a new contributor. Be nice, and check out our Code of Conduct.














                                                                                            If this is an answer to a challenge…



                                                                                            • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                                                            • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                                              Explanations of your answer make it more interesting to read and are very much encouraged.


                                                                                            • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                                                                            More generally…



                                                                                            • …Please make sure to answer the question and provide sufficient detail.


                                                                                            • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                                                                            draft saved


                                                                                            draft discarded














                                                                                            StackExchange.ready(
                                                                                            function ()
                                                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f181627%2fprint-last-inputted-byte%23new-answer', 'question_page');

                                                                                            );

                                                                                            Post as a guest















                                                                                            Required, but never shown





















































                                                                                            Required, but never shown














                                                                                            Required, but never shown












                                                                                            Required, but never shown







                                                                                            Required, but never shown

































                                                                                            Required, but never shown














                                                                                            Required, but never shown












                                                                                            Required, but never shown







                                                                                            Required, but never shown







                                                                                            Popular posts from this blog

                                                                                            Which organization defines CJK Unified Ideographs? The Next CEO of Stack OverflowCharacters which have several different shapesHow useful are the kanji in reading Chinese?Can Chinese readers scan large amounts of text faster/more accurately than their alphabet-using counterparts?丼: why is “well” also “bowl of food”?What Does Unicode 8.0 Mean For Chinese?How are blanks indicated for placeholders in Chinese (like ???)Is there a dictionary of standard character variants?How to display CJK Extension F?How is it decided as to which character is used on the tech terminology?How does 子 come to mean 'midnight'?

                                                                                            When We Were Young (canção de Adele) Índice Antecedentes e lançamento | Faixas e formatos | Performances e covers | Desempenho nas tabelas musicais | Créditos | Histórico de lançamento | Referências Menu de navegação«Best albums of 2015»«Adele - When We Were Young (Radio Date: 22-01-2016)»«When We Were Young - Single by Adele»«Adele: Inside Her Private Life and Triumphant Return»«adele interview: world exclusive first interview in three years»«Tobias Jesso Jr: since Adele tweeted his song, he's even bigger than his dad»«Adele interviews Tobias Jesso Jr: 'I think that a couple of the ideas we had could be rap songs'»«Adele on Her Return: 'I Was So Frightened That No One Cared'»«Tobias Jesso Jr. on working with Adele: 'I was as nervous as shit'»«How Ariel Rechtshaid Pushed Adele To Her Limit»«Adele Previews 'When We Were Young' on '60 Minutes' Teaser, Tops Trending 140»«Adele Performs New '25' Ballad, "When We Were Young" Live: Watch»«Which '25' Song Should Be Adele's Next Single?»«Adele's 'When We Were Young' Confirmed As Second Single From '25'»«Adele's new single artwork for 'When We Were Young' is perfectly adorable»«Adele at the BBC review: honest, funny and spectacular – Celebrity News News»«'Saturday Night Live': Adele Sings 'Hello' and 'When We Were Young'»«'Adele: Live in New York City' NBC Special – Set List Revealed!»«Adele Closes Out the 2016 Brit Awards With 'When We Were Young'»«What Is The Adele Live Tour Set List? There's No Way She'd Leave Out These 8 Songs»«See Demi Lovato's Soaring Cover of Adele's 'When We Were Young'»«'The Voice': 5 Best Moments From Week 1 Blind Auditions»«Adele – When We Were Young (Media Control Charts)»«Adele – When We Were Young (Entertainment Monitoring Africa)»«Adele – When We Were Young (ARIA Charts)»«Adele – When We Were Young (Ö3 Austria Top 40)»«Adele – When We Were Young (Ultratop 50)»«Adele – When We Were Young (Ultratop 40)»«Adele – When We Were Young (Canadian Hot 100)»«Adele – When We Were Young (Tracklisten)»«Adele – When We Were Young (The Official Charts Company)»«Adele – Hello (IFPI Slovenská Republika)»«Adele – When We Were Young (Productores de Música de España)»«Adele – When We Were Young (Billboard Hot 100)»«Adele – When We Were Young (Pop Songs)»«Adele – When We Were Young (Adult Pop Songs)»«Adele – When We Were Young (Hot Adult Contemporary Charts)»«Adele – When We Were Young (Hot Dance Club Songs)»«Adele – When We Were Young (Rock Airplay)»«Adele – When We Were Young (IFPI Finlândia)»«Adele – When We Were Young (Syndicat National de l'Éditon Phonographique)»«Adele – When We Were Young (Magyar Hanglemezkiadók Szövetsége)»«Adele – When We Were Young (Irish Recorded Music Association)»«Adele – When We Were Young (Mexico Airplay)»«Adele – When We Were Young (VG-lista)»«Adele – When We Were Young (NZ Top 40 Singles)»«Adele – When We Were Young (MegaCharts)»«Adele – When We Were Young (Związek Producentów Audio Video)»«Adele – When We Were Young (Portugal Digital Songs)»«Adele – When We Were Young (UK Indie Singles Chart)»«Adele – When We Were Young (UK Singles Chart)»«Adele – When We Were Young (Sverigetopplistan)»«Adele – When We Were Young (Schweizer Hitparade)»«Adele – When We Were Young (Portugal Digital Songs)»«Music Canada – Gold/Platinum – When We Were Young»«NZ Top 40 Singles Chart»«Certified Awards»e

                                                                                            Shenzhen Football Club Índice Elenco atual | Títulos | Referências Ligações externas | Menu de navegaçãoGooglenotíciaslivrosacadêmicoeditar«"Elenco"»Site oficialexpandindo-oeee