[java]import java.io.*;
import java.util.*;
class Main
{
public static String readln(int len)
{
byte lin[]=new byte[len];
int lg=0, car=-1;
try
{
while(lg<len)
{
car=System.in.read();
// if(lg==0&&(car=='\r')||(car=='\n')) continue;
// if((car<0)||(car=='\r')||(car=='\n')) break;
if((car ...
Search found 4 matches
- Thu Apr 24, 2003 11:11 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116641
- Thu Apr 24, 2003 1:18 am
- Forum: Volume 1 (100-199)
- Topic: 113 - Power of Cryptography
- Replies: 163
- Views: 50334
- Wed Apr 23, 2003 6:05 pm
- Forum: Volume 1 (100-199)
- Topic: 113 - Power of Cryptography
- Replies: 163
- Views: 50334
- Wed Apr 23, 2003 3:50 pm
- Forum: Java
- Topic: Very annoying difference between Windows and Linux
- Replies: 2
- Views: 2273
Very annoying difference between Windows and Linux
In windows, "\r\n" means new line while "\n" in Linux
Because of that, At first time I got some of [WA] signal when I posted my JAVA program.
In Windows, I have to change readln() just like this
[java]while(lg<len)
{
car=System.in.read();
if(lg==0&&(car=='\r')||(car=='\n')) continue;
if((car ...
Because of that, At first time I got some of [WA] signal when I posted my JAVA program.
In Windows, I have to change readln() just like this
[java]while(lg<len)
{
car=System.in.read();
if(lg==0&&(car=='\r')||(car=='\n')) continue;
if((car ...