第十一届蓝桥杯大赛软件类省赛
C/C++大学B组
试题
答案:3880
public class Main {
public static void main(String[] args) {
int tot = 10000;
boolean go = true;
int ans = 0;
while(true && tot >= 0) {
if(go) {
if(tot - 600 < 0) break;
tot -= 600;
go = false;
} else {
tot += 300;
go = true;
}
ans ++;
}
System.out.println(ans * 60 + tot / 10);
}
}
答案:52038720
import java.util.Date;
import java.text.SimpleDateFormat;
import java.text.ParseException;
public class Main