結果
問題 | No.219 巨大数の概算 |
ユーザー |
![]() |
提出日時 | 2016-11-25 17:23:41 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 565 ms / 1,500 ms |
コード長 | 534 bytes |
コンパイル時間 | 2,111 ms |
コンパイル使用メモリ | 77,056 KB |
実行使用メモリ | 48,980 KB |
最終ジャッジ日時 | 2024-07-18 12:17:48 |
合計ジャッジ時間 | 31,117 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 51 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); for(int i=0; i<N; i++){ long A = sc.nextLong(); long B = sc.nextLong(); double c = Math.log10(A)*B; long d = (long)c; double e = c-(double)d; int f = (int)(Math.pow(10,e)*10); int g = f/10; int h = f%10; System.out.println(g+" "+h+" "+d); } } }