結果

問題 No.219 巨大数の概算
ユーザー taba
提出日時 2016-04-16 06:42:42
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-04 10:11:07
合計ジャッジ時間 11,795 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 46 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n=input()
def P(a,b):
	r=1
	while b>0:
		if b&1==0:
			a*=a
			b/=2
		else:
			r*=a
			b-=1
		while a>10:
			a/=10.
		while r>10:
			r/=10.
	return `r`[:3:2]
for i in xrange(n):
	a,b=map(int,raw_input().split())
	x,y=P(a,b)
	print x,y,int(math.log10(a)*b)
0