結果

問題 No.219 巨大数の概算
ユーザー mikoto1357
提出日時 2015-05-29 22:44:49
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 572 bytes
コンパイル時間 3,419 ms
コンパイル使用メモリ 76,744 KB
実行使用メモリ 62,220 KB
最終ジャッジ日時 2024-07-06 11:47:17
合計ジャッジ時間 33,040 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 51
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder219{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = scan.nextInt();
			b[i] = scan.nextInt();
		}
		for(int i = 0;i < n;i++){
			long value = (long)(Math.pow(a[i] , b[i]));
			String str = "" + value;
			int z = str.length() - 1;
			int x = Integer.parseInt(str.substring(0,1));
			int y = Integer.parseInt(str.substring(1,2));
			System.out.println(x + " " + y + " " + z);
		}
	}
}
0