結果
| 問題 |
No.237 作図可能性
|
| コンテスト | |
| ユーザー |
eitaho
|
| 提出日時 | 2015-07-07 22:26:54 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 2,000 ms |
| コード長 | 9,681 bytes |
| コンパイル時間 | 807 ms |
| コンパイル使用メモリ | 111,488 KB |
| 実行使用メモリ | 18,816 KB |
| 最終ジャッジ日時 | 2024-07-08 01:32:15 |
| 合計ジャッジ時間 | 2,208 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Diagnostics;
using System.Numerics;
using Enu = System.Linq.Enumerable;
class Program
{
public void Solve()
{
int A = Reader.Int();
int ans = List.Count(x => x <= A);
Console.WriteLine(ans);
}
static readonly int[] List = new[]
{
3,
4,
5,
6,
8,
10,
12,
15,
16,
17,
20,
24,
30,
32,
34,
40,
48,
51,
60,
64,
68,
80,
85,
96,
102,
120,
128,
136,
160,
170,
192,
204,
240,
255,
256,
257,
272,
320,
340,
384,
408,
480,
510,
512,
514,
544,
640,
680,
768,
771,
816,
960,
1020,
1024,
1028,
1088,
1280,
1285,
1360,
1536,
1542,
1632,
1920,
2040,
2048,
2056,
2176,
2560,
2570,
2720,
3072,
3084,
3264,
3840,
3855,
4080,
4096,
4112,
4352,
4369,
5120,
5140,
5440,
6144,
6168,
6528,
7680,
7710,
8160,
8192,
8224,
8704,
8738,
10240 ,
10280 ,
10880 ,
12288 ,
12336 ,
13056 ,
13107 ,
15360 ,
15420 ,
16320 ,
16384 ,
16448 ,
17408 ,
17476 ,
20480 ,
20560 ,
21760 ,
21845 ,
24576 ,
24672 ,
26112 ,
26214 ,
30720 ,
30840 ,
32640 ,
32768 ,
32896 ,
34816 ,
34952 ,
40960 ,
41120 ,
43520 ,
43690 ,
49152 ,
49344 ,
52224 ,
52428 ,
61440 ,
61680 ,
65280 ,
65535 ,
65536 ,
65537 ,
65792 ,
69632 ,
69904 ,
81920 ,
82240 ,
87040 ,
87380 ,
98304 ,
98688 ,
104448,
104856,
122880,
123360,
130560,
131070,
131072,
131074,
131584,
139264,
139808,
163840,
164480,
174080,
174760,
196608,
196611,
197376,
208896,
209712,
245760,
246720,
261120,
262140,
262144,
262148,
263168,
278528,
279616,
327680,
327685,
328960,
348160,
349520,
393216,
393222,
394752,
417792,
419424,
491520,
493440,
522240,
524280,
524288,
524296,
526336,
557056,
559232,
655360,
655370,
657920,
696320,
699040,
786432,
786444,
789504,
835584,
838848,
983040,
983055,
986880,
1044480,
1048560,
1048576,
1048592,
1052672,
1114112,
1114129,
1118464,
1310720,
1310740,
1315840,
1392640,
1398080,
1572864,
1572888,
1579008,
1671168,
1677696,
1966080,
1966110,
1973760,
2088960,
2097120,
2097152,
2097184,
2105344,
2228224,
2228258,
2236928,
2621440,
2621480,
2631680,
2785280,
2796160,
3145728,
3145776,
3158016,
3342336,
3342387,
3355392,
3932160,
3932220,
3947520,
4177920,
4194240,
4194304,
4194368,
4210688,
4456448,
4456516,
4473856,
5242880,
5242960,
5263360,
5570560,
5570645,
5592320,
6291456,
6291552,
6316032,
6684672,
6684774,
6710784,
7864320,
7864440,
7895040,
8355840,
8388480,
8388608,
8388736,
8421376,
8912896,
8913032,
8947712,
10485760,
10485920,
10526720,
11141120,
11141290,
11184640,
12582912,
12583104,
12632064,
13369344,
13369548,
13421568,
15728640,
15728880,
15790080,
16711680,
16711935,
16776960,
16777216,
16777472,
16842752,
16843009,
17825792,
17826064,
17895424,
20971520,
20971840,
21053440,
22282240,
22282580,
22369280,
25165824,
25166208,
25264128,
26738688,
26739096,
26843136,
31457280,
31457760,
31580160,
33423360,
33423870,
33553920,
33554432,
33554944,
33685504,
33686018,
35651584,
35652128,
35790848,
41943040,
41943680,
42106880,
44564480,
44565160,
44738560,
50331648,
50332416,
50528256,
50529027,
53477376,
53478192,
53686272,
62914560,
62915520,
63160320,
66846720,
66847740,
67107840,
67108864,
67109888,
67371008,
67372036,
71303168,
71304256,
71581696,
83886080,
83887360,
84213760,
84215045,
89128960,
89130320,
89477120,
100663296,
100664832,
101056512,
101058054,
106954752,
106956384,
107372544,
125829120,
125831040,
126320640,
133693440,
133695480,
134215680,
134217728,
134219776,
134742016,
134744072,
142606336,
142608512,
143163392,
167772160,
167774720,
168427520,
168430090,
178257920,
178260640,
178954240,
201326592,
201329664,
202113024,
202116108,
213909504,
213912768,
214745088,
251658240,
251662080,
252641280,
252645135,
267386880,
267390960,
268431360,
268435456,
268439552,
269484032,
269488144,
285212672,
285217024,
286326784,
286331153,
335544320,
335549440,
336855040,
336860180,
356515840,
356521280,
357908480,
402653184,
402659328,
404226048,
404232216,
427819008,
427825536,
429490176,
503316480,
503324160,
505282560,
505290270,
534773760,
534781920,
536862720,
536870912,
536879104,
538968064,
538976288,
570425344,
570434048,
572653568,
572662306,
671088640,
671098880,
673710080,
673720360,
713031680,
713042560,
715816960,
805306368,
805318656,
808452096,
808464432,
855638016,
855651072,
858980352,
858993459,
};
}
class Entry { static void Main() { new Program().Solve(); } }
class Reader
{
private static TextReader reader = Console.In;
private static readonly char[] separator = { ' ' };
private static readonly StringSplitOptions op = StringSplitOptions.RemoveEmptyEntries;
private static string[] A = new string[0];
private static int i;
private static void Init() { A = new string[0]; }
public static void Set(TextReader r) { reader = r; Init(); }
public static void Set(string file) { reader = new StreamReader(file); Init(); }
public static bool HasNext() { return CheckNext(); }
public static string String() { return Next(); }
public static int Int() { return int.Parse(Next()); }
public static long Long() { return long.Parse(Next()); }
public static double Double() { return double.Parse(Next()); }
public static int[] IntLine() { return Array.ConvertAll(Split(Line()), int.Parse); }
public static int[] IntArray(int N) { return Enu.Range(0, N).Select(i => Int()).ToArray(); }
public static int[][] IntTable(int H) { return Enu.Range(0, H).Select(i => IntLine()).ToArray(); }
public static string[] StringArray(int N) { return Enu.Range(0, N).Select(i => Line()).ToArray(); }
public static string Line() { return reader.ReadLine().Trim(); }
private static string[] Split(string s) { return s.Split(separator, op); }
private static string Next() { CheckNext(); return A[i++]; }
private static bool CheckNext()
{
if (i < A.Length) return true;
string line = reader.ReadLine();
if (line == null) return false;
if (line == "") return CheckNext();
A = Split(line);
i = 0;
return true;
}
}
eitaho