結果
問題 | No.219 巨大数の概算 |
ユーザー |
![]() |
提出日時 | 2015-05-29 22:41:40 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 570 bytes |
コンパイル時間 | 2,883 ms |
コンパイル使用メモリ | 86,740 KB |
実行使用メモリ | 61,412 KB |
最終ジャッジ日時 | 2024-07-06 11:41:53 |
合計ジャッジ時間 | 32,520 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 51 |
ソースコード
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++){ int value = (int)(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); } } }