标签:
package acm;
import java.util.Scanner;
public class L3_2 {
/** * @param args */
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan=new Scanner(System.in);
int a[]=new int[1000];
int n=scan.nextInt();
int i=0;
int sum=0;
while(n>0){
a[i]=n%10;
n=n/10;
sum=(int) (sum+a[i]*Math.pow(8, i));
i++;
}
System.out.println(sum);
}
}
标签:
原文地址:http://www.cnblogs.com/bidouweng/p/4265339.html