結果

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

ソースコード

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