結果
| 問題 | 
                            No.1286 Stone Skipping
                             | 
                    
| コンテスト | |
| ユーザー | 
                             沙耶花
                         | 
                    
| 提出日時 | 2020-11-13 21:26:15 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 412 bytes | 
| コンパイル時間 | 1,995 ms | 
| コンパイル使用メモリ | 191,428 KB | 
| 最終ジャッジ日時 | 2025-01-15 22:31:45 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 TLE * 1 | 
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000005
int main(){
	long long D;
	cin>>D;
	
	for(long long i=D/2;true;i++){
		long long now = i;
		long long sum = D;
		while(true){
			sum -= now;
			if(sum<0)break;
			if(sum==0){
				cout<<i<<endl;
				return 0;
			}
			
			now /= 2;
			if(now==0)break;
		}
	}
	
	
	return 0;
}
            
            
            
        
            
沙耶花