逃离岛(贪到底)
import java.io.*; import java.math.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); PrintWriter out =new PrintWriter(new OutputStreamWriter(System.out)); Scanner scan=new Scanner(System.in); int M=scan.nextInt(),S=scan.nextInt(),T=scan.nextInt(); int s=0,b=0; for(int i=1;i<=T;i++) { s+=17; if(M>=10) { b+=60; M-=10; }else M+=4; s=Math.max(s, b); if(s>=S) { out.println("Yes\n"+i); out.flush(); return; } } out.println("No\n"+s); out.flush(); } }