結果

問題 No.820 Power of Two
コンテスト
ユーザー giru_yukiko
提出日時 2019-05-27 21:18:14
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 336 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 198 ms
コンパイル使用メモリ 47,744 KB
実行使用メモリ 16,768 KB
最終ジャッジ日時 2026-04-06 08:39:28
合計ジャッジ時間 6,684 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~

ソースコード

diff #
raw source code

#include <stdio.h>
#include <math.h>

main(){
	int index1,index2;
	int number=1;
	int ans=0;
	long long cmp[2];
	char buf[100];

	fgets(buf,sizeof(buf),stdin);
	sscanf(buf,"%d %d",&index1,&index2);

	cmp[0]=pow(2,index1);
	cmp[1]=number*pow(2,index2);
	while(cmp[1]<=cmp[0]){
		number++;
		ans++;
	}

	printf("%x\n",ans);
	return(0);
}
0