File tree 1 file changed +13
-9
lines changed
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ Here is a task similar to the one that was solved in Kamil's video:
77
77
78
78
<FocusProblem problem = " general" />
79
79
80
+ <Info title = " Beginners!" >
81
+ If you have prior programming experience we encourage you to register a Kattis account and submit a solution.
82
+ If not, feel free to skip ahead to the solution.
83
+ </Info >
84
+
80
85
<Spoiler title = " Solution" >
81
86
82
87
Just print the second-to-last character of the input.
@@ -108,15 +113,14 @@ print(input()[-2])
108
113
<JavaSection>
109
114
110
115
```java
111
- // with Kattio from /general/input-output#java
112
-
113
- public class A {
114
- static Kattio io = new Kattio ();
115
- public static void main (String [] args ) {
116
- String s = io .next ();
117
- System.out.println(s.charAt(s.length()-2 ));
118
- io.close(); // make sure to include this line -- closes io and flushes the output
119
- }
116
+ import java.util.Scanner;
117
+
118
+ public class basketballoneonone {
119
+ public static void main (String [] args ) {
120
+ Scanner in = new Scanner (System .in );
121
+ String s = in .next ();
122
+ System.out.println(s.charAt(s.length()-2 ));
123
+ }
120
124
}
121
125
```
122
126
You can’t perform that action at this time.
0 commit comments