結果
問題 | No.237 作図可能性 |
ユーザー |
![]() |
提出日時 | 2016-03-18 02:37:33 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 350 bytes |
コンパイル時間 | 578 ms |
コンパイル使用メモリ | 54,660 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-01 09:00:11 |
合計ジャッジ時間 | 1,563 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
ソースコード
#include <iostream> using namespace std; int main(){ int f[] = {3,5,17,257,65537}; int a,ans = 0; cin >> a; for(int i = 0;i < 30;i++){ for(int j = 0;j < 32;j++){ long long x = (1 << i); for(int k = 0;k < 5;k++) if(j >> k & 1) x *= f[k]; if(x >= 3 && x <= a) ans++; } } cout << ans << endl; }