結果

問題 No.1700 floor X
ユーザー AnkitAnkit
提出日時 2021-10-09 00:29:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 77,792 KB
最終ジャッジ日時 2023-09-16 09:23:12
合計ジャッジ時間 7,603 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,164 KB
testcase_01 AC 113 ms
76,572 KB
testcase_02 AC 113 ms
76,568 KB
testcase_03 AC 113 ms
76,520 KB
testcase_04 AC 115 ms
77,332 KB
testcase_05 AC 112 ms
76,524 KB
testcase_06 AC 115 ms
77,316 KB
testcase_07 AC 115 ms
77,016 KB
testcase_08 AC 119 ms
77,064 KB
testcase_09 AC 115 ms
76,636 KB
testcase_10 AC 112 ms
76,440 KB
testcase_11 AC 112 ms
76,724 KB
testcase_12 AC 119 ms
77,096 KB
testcase_13 AC 114 ms
76,724 KB
testcase_14 AC 113 ms
76,764 KB
testcase_15 AC 114 ms
76,636 KB
testcase_16 AC 115 ms
76,512 KB
testcase_17 AC 110 ms
76,532 KB
testcase_18 AC 112 ms
76,560 KB
testcase_19 AC 117 ms
77,000 KB
testcase_20 AC 115 ms
76,620 KB
testcase_21 AC 128 ms
76,996 KB
testcase_22 AC 126 ms
76,924 KB
testcase_23 AC 128 ms
76,956 KB
testcase_24 AC 124 ms
76,984 KB
testcase_25 AC 127 ms
77,080 KB
testcase_26 AC 128 ms
77,284 KB
testcase_27 AC 127 ms
77,100 KB
testcase_28 AC 129 ms
77,204 KB
testcase_29 AC 130 ms
76,924 KB
testcase_30 AC 126 ms
77,100 KB
testcase_31 AC 128 ms
77,280 KB
testcase_32 AC 133 ms
77,156 KB
testcase_33 AC 127 ms
77,076 KB
testcase_34 AC 128 ms
77,228 KB
testcase_35 AC 127 ms
77,400 KB
testcase_36 AC 127 ms
77,072 KB
testcase_37 AC 127 ms
77,016 KB
testcase_38 AC 128 ms
77,296 KB
testcase_39 AC 128 ms
77,016 KB
testcase_40 AC 129 ms
77,320 KB
testcase_41 AC 126 ms
77,080 KB
testcase_42 AC 73 ms
71,132 KB
testcase_43 AC 126 ms
77,016 KB
testcase_44 AC 139 ms
77,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())
for ti in range(t):
	n=int(input())
	
	r=0;
	high=n;
	low=1;
	
	if(n>1):
		high//=2;
		
		
	while(1):
		mid=low+high;
		mid//=2;
		
		if((mid*mid)==n):
			r=mid
			break;
			
		elif((mid*mid)<n and ((mid+1)*(mid+1))>n):
			r=mid;
			break;
			
		elif((mid*mid)>n):
			high=mid-1;
		else:
			low=mid+1 
	
	print(r)
	
	
0