|
|
back to boardHelp me! import java.util.*; import java.math.*; public class B1295 { public static void main (String [] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); BigInteger t1=BigInteger.valueOf(2).pow(n); BigInteger t2=BigInteger.valueOf(3).pow(n); BigInteger t3=BigInteger.valueOf(4).pow(n); BigInteger t=BigInteger.valueOf(0); t=t.add(t1); t=t.add(t2); t=t.add(t3); t=t.add(BigInteger.valueOf(1)); BigInteger k=BigInteger.valueOf(0); while(t.mod(BigInteger.valueOf(10))==BigInteger.valueOf(0)) { k=k.add(BigInteger.valueOf(1)); t=t.divide(BigInteger.valueOf(10)); } System.out.println(k); } } This program give AC Edited by author 19.07.2011 12:09 Edited by author 19.07.2011 12:09 |
|
|