You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class HelloWorld{
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader()
{
br = new BufferedReader(
new InputStreamReader(System.in));
}
String next()
{
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
}
catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() { return Integer.parseInt(next()); }
long nextLong() { return Long.parseLong(next()); }
double nextDouble()
{
return Double.parseDouble(next());
}
String nextLine()
{
String str = "";
try {
str = br.readLine();
}
catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
public static void main(String[] args){
FastReader s = new FastReader();
int n = s.nextInt();
int k = s.nextInt();
int count = 0;
while (n-- > 0) {
int x = s.nextInt();
if (x % k == 0)
count++;
}
System.out.println(count);
}
}`
It gets compiled fine. But when I run it on browser, I am getting this error:
Uncaught TypeError: bytecoder.filehandles[handle].readBytesINTL1BYTEINTINT is not a function at Object.readBytesINTL1BYTEINTINT (bytecoder.js:577) at C.INTreadBytesINTA1BYTEINTINT (bytecoder.js:64516) at C.p.INTreadA1BYTEINTINT (bytecoder.js:64537) at C.p.INTreadBytes (bytecoder.js:70032) at C.p.INTimplReadA1CHARINTINT (bytecoder.js:69837) at C.p.INTreadA1CHARINTINT (bytecoder.js:69478) at C.p.INTreadA1CHARINTINT (bytecoder.js:65219) at C.p.VOIDfill (bytecoder.js:63357) at C.p.jlStringreadLineBOOLEANA1BOOLEAN (bytecoder.js:63093) at C.p.jlStringreadLine (bytecoder.js:63006)
Please help.
The text was updated successfully, but these errors were encountered:
I am trying to compile some code which takes input using BufferedReader:
`package main;
import java.util.StringTokenizer;
import java.io.*;
class HelloWorld{
static class FastReader {
BufferedReader br;
StringTokenizer st;
}`
It gets compiled fine. But when I run it on browser, I am getting this error:
Uncaught TypeError: bytecoder.filehandles[handle].readBytesINTL1BYTEINTINT is not a function at Object.readBytesINTL1BYTEINTINT (bytecoder.js:577) at C.INTreadBytesINTA1BYTEINTINT (bytecoder.js:64516) at C.p.INTreadA1BYTEINTINT (bytecoder.js:64537) at C.p.INTreadBytes (bytecoder.js:70032) at C.p.INTimplReadA1CHARINTINT (bytecoder.js:69837) at C.p.INTreadA1CHARINTINT (bytecoder.js:69478) at C.p.INTreadA1CHARINTINT (bytecoder.js:65219) at C.p.VOIDfill (bytecoder.js:63357) at C.p.jlStringreadLineBOOLEANA1BOOLEAN (bytecoder.js:63093) at C.p.jlStringreadLine (bytecoder.js:63006)
Please help.
The text was updated successfully, but these errors were encountered: