Contest Duration: ~ (local time) (100 minutes) Back to Home

Submission #3071821

Source Code Expand

Copy
```import java.util.*;
import java.io.*;
import java.text.*;
//Solution Credits: Taranpreet Singh
public class Main{
//SOLUTION BEGIN
void solve(int TC) throws Exception{
pn(ni()+1-ni());
}
//SOLUTION ENDS
long mod = (int)1e9+9, IINF = (long)1e12;
final int MAX = (int)1e5+1, INF = (int)1e9, root = 3;
DecimalFormat df = new DecimalFormat("0.00000000");
double PI = 3.141592653589793238462643383279502884197169399375105820974944, eps = 1e-8;
static boolean multipleTC = false, memory = true;
void run() throws Exception{
in = new FastReader();
out = new PrintWriter(System.out);
int T = (multipleTC)?ni():1;
//Solution Credits: Taranpreet Singh
for(int i = 1; i<= T; i++)solve(i);
out.flush();
out.close();
}
public static void main(String[] args) throws Exception{
if(memory)new Thread(null, new Runnable() {public void run(){try{new Main().run();}catch(Exception e){e.printStackTrace();}}}, "1", 1 << 28).start();
else new Main().run();
}
long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
int bit(long n){return (n==0)?0:(1+bit(n&(n-1)));}
void p(Object o){out.print(o);}
void pn(Object o){out.println(o);}
void pni(Object o){out.println(o);out.flush();}
String n(){return in.next();}
String nln(){return in.nextLine();}
int ni(){return Integer.parseInt(in.next());}
long nl(){return Long.parseLong(in.next());}
double nd(){return Double.parseDouble(in.next());}

StringTokenizer st;
}

public FastReader(String s) throws Exception{
}

String next(){
while (st == null || !st.hasMoreElements()){
try{
st = new StringTokenizer(br.readLine());
}catch (IOException  e){
e.printStackTrace();
}
}
return st.nextToken();
}

String nextLine(){
String str = "";
try{
}catch (IOException e){
e.printStackTrace();
}
return str;
}
}
}```

#### Submission Info

Submission Time 2018-08-25 21:00:56+0900 A - Train Taran_1407 Java8 (OpenJDK 1.8.0) 100 2579 Byte AC 97 ms 23124 KB

#### Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_00.txt, 0_01.txt, 0_02.txt
All 100 / 100 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt
Case Name Status Exec Time Memory
0_00.txt 97 ms 19796 KB
0_01.txt 86 ms 22348 KB
0_02.txt 89 ms 22996 KB
1_00.txt 87 ms 22996 KB
1_01.txt 87 ms 22348 KB
1_02.txt 88 ms 22484 KB
1_03.txt 88 ms 23124 KB
1_04.txt 87 ms 23124 KB