ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1601. AntiCAPS

Java 8: How to use both input and output?
Posted by Ionkin M [Samara SAU #617] 3 Apr 2017 01:42
Sorry for my bad English.
I use

    int ch;
    while ((ch = System.in.read()) != -1) {
        // my solution
        System.out.print(<some char>);
    }
    System.out.println();

But I get WA #1 with or without last code line. I also used System.out.flush (without last line), but it do not help me.
Re: Java 8: How to use both input and output?
Posted by andrYushka 15 Jul 2019 19:38
Use Scanner from utils,that's better and esier , than use System.in.read()