package 練習; import java.util.Date; import java.util.Scanner; public class main{ public static void main(String[] args){ long exec_time=new Date().getTime(); Scanner sc=new Scanner(System.in); long w=sc.nextLong(); long d=sc.nextLong(); long done=0; for(long i=d;i>1;i--){ w-=(long)w/(i*i); } System.out.println(w); System.err.println(new Date().getTime()-exec_time+"ms"); } }