?? pku2665.java
字號:
import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args) throws Exception
{
Scanner cin=new Scanner(System.in);
long L,M,temp;
int i;
while(true)
{
L=cin.nextInt();
M=cin.nextInt();
if(M==0&&L==0) break;
for(i=0,temp=L+1;i<M;i++)
{
temp+=cin.nextInt();
temp-=cin.nextInt();
temp-=1;
}
System.out.println(temp);
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -