結果
| 問題 | 
                            No.237 作図可能性
                             | 
                    
| コンテスト | |
| ユーザー | 
                             yaoshimax
                         | 
                    
| 提出日時 | 2016-02-23 01:13:13 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 11 ms / 2,000 ms | 
| コード長 | 340 bytes | 
| コンパイル時間 | 604 ms | 
| コンパイル使用メモリ | 7,200 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-09-22 13:07:55 | 
| 合計ジャッジ時間 | 1,328 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 28 | 
ソースコード
A=int(raw_input())
F_p=[3,5,17,257,65537]
V=[1]
for i in range(1,(1<<5)):
    f=1
    for j in range(0,5):
        if (i&(1<<j))!=0:
            f*=F_p[j]
    V.append(f)
V.sort()
#for v in V:
#    print v
ans = 0
n = len(V)
while A>0:
    while n>0 and A<V[n-1]:
        n=n-1
    #print A, n, V[n-1]
    ans+=n
    A/=2
print ans-2
    
            
            
            
        
            
yaoshimax