首页 > 学院 > 开发设计 > 正文

[BZOJ]4404: [Neerc2015]Binary vs Decimal

2019-11-06 06:29:34
字体:
来源:转载
供稿:网友

由于本人太垃圾了,只能打表

#include <iostream>#include <cstdio>using namespace std;int n,fa[]={0,0,0,2,0,4,4,4,0,8,6,6,0,12,10,10,8,8,8,8,0,20,12,12,12,12,8,8,0,28,18,18,12,12,10,10,0,36,26,26,12,12,12,12,0,44,18,18,12,12,10,10,0,52,14,14,12,12,8,8,0,60,22,22,20,20,16,16,16,16,16,16,16,16,16,16,0,76,34,34,26,26,24,24,24,24,22,22,18,18,16,16,0,92,50,50,42,42,40,40,40,40,38,38,34,34,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,124,68,68,64,64,60,60,54,54,54,54,52,52,48,48,48,48,44,44,42,42,42,42,38,38,38,38,36,36,32,32,0,156,100,100,90,90,82,82,72,72,68,68,64,64,58,58,48,48,48,48,46,46,44,44,40,40,40,40,38,38,36,36,0,188,98,98,66,66,64,64,62,62,56,56,54,54,52,52,48,48,42,42,34,34,34,34,34,34,32,32,32,32,32,32,0,220,88,88,82,82,80,80,72,72,52,52,50,50,50,50,48,48,42,42,42,42,42,42,40,40,34,34,34,34,34,34,0,252,120,120,114,114,74,74,60,60,58,58,52,52,52,52,48,48,48,48,48,48,40,40,34,34,34,34,34,34,34,34,0,284,144,144,104,104,86,86,78,78,74,74,72,72,64,64,56,56,54,54,52,52,50,50,50,50,48,48,46,46,46,46,44,44,44,44,42,42,40,40,0,324,184,184,144,144,126,126,118,118,114,114,112,112,104,104,96,96,94,94,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,0,364,182,182,164,164,150,150,138,138,130,130,92,92,90,90,90,90,88,88,86,86,86,86,64,64,62,62,62,62,60,60,58,58,58,58,56,56,54,54,54,54,52,52,50,50,50,50,0,412,210,210,196,196,174,174,132,132,124,124,96,96,88,88,84,84,80,80,78,78,74,74,72,72,70,70,70,70,68,68,66,66,62,62,58,58,54,54,52,52,50,50,50,50,48,48,0,460,218,218,166,166,128,128,118,118,116,116,108,108,100,100,92,92,82,82,76,76,76,76,72,72,68,68,66,66,64,64,62,62,62,62,60,60,56,56,54,54,52,52,50,50,50,50,0,508,266,266,214,214,160,160,152,152,144,144,136,136,116,116,98,98,96,96,78,78,76,76,72,72,72,72,72,72,68,68,68,68,68,68,68,68,64,64,58,58,58,58,50,50,50,50,0,556,184,184,176,176,156,156,138,138,112,112,108,108,96,96,96,96,92,92,86,86,74,74,72,72,64,64,64,64,64,64,64,64,60,60,60,60,52,52,52,52,52,52,52,52,48,48,0,604,232,232,202,202,184,184,158,158,138,138,96,96,86,86,78,78,76,76,76,76,72,72,72,72,72,72,70,70,70,70,70,70,66,66,56,56,50,50,50,50,48,48,48,48,48,48,0,652,280,280,202,202,182,182,128,128,120,120,110,110,110,110,110,110,104,104,100,100,82,82,82,82,76,76,76,76,76,76,72,72,72,72,70,70,70,70,66,66,66,66,66,66,62,62,62,62,60,60,60,60,56,56,0,708,234,234,170,170,160,160,160,160,146,146,126,126,120,120,118,118,114,114,110,110,100,100,96,96,92,92,84,84,80,80,78,78,78,78,78,78,74,74,72,72,72,72,70,70,70,70,68,68,62,62,62,62,60,60,0,764,210,210,116,116,104,104,64,64,58,58,40,40,34,34,0,780,116,116,68,68,50,50,24,24,20,20,18,18,18,18,0,796,132,132,84,84,38,38,34,34,32,32,28,28,28,28,28,28,26,26,26,26,26,26,0,820,58,58,42,42,42,42,38,38,38,38,36,36,32,32,26,26,26,26,24,24,24,24,0,844,56,56,56,56,54,54,36,36,36,36,36,36,30,30,30,30,30,30,24,24,24,24,0,868,80,80,54,54,44,44,44,44,38,38,36,36,36,36,30,30,26,26,26,26,26,26,0,892,76,76,64,64,54,54,46,46,40,40,36,36,34,34,32,32,30,30,28,28,26,26,0,916,100,100,88,88,78,78,70,70,64,64,36,36,36,36,36,36,36,36,36,36,36,36,0,940,124,124,100,100,92,92,56,56,56,56,54,54,54,54,40,40,40,40,38,38,38,38,36,36,36,36,34,34,34,34,0,972,156,156,132,132,124,124,52,52,52,52,50,50,50,50,48,48,48,48,48,48,48,48,32,32,32,32,32,32,32,32,0,1004,162,162,78,78,74,74,72,72,70,70,50,50,48,48,48,48,46,46,42,42,40,40,40,40,38,38,34,34,32,32,0,1036,102,102,100,100,72,72,68,68,64,64,56,56,52,52,48,48,44,44,44,44,40,40,38,38,38,38,34,34,34,34,0,1068,100,100,96,96,92,92,72,72,60,60,58,58,58,58,48,48,44,44,44,44,44,44,40,40,36,36,36,36,36,36,0,1100,84,84,82,82,82,82,66,66,66,66,66,66,62,62,48,48,40,40,40,40,40,40,38,38,38,38,38,38,38,38,0,1132,112,112,94,94,92,92,88,88,74,74,64,64,60,60,58,58,58,58,52,52,50,50,48,48,46,46,46,46,46,46,44,44,42,42,40,40,40,40,0,1172,128,128,108,108,88,88,76,76,74,74,70,70,66,66,64,64,60,60,60,60,56,56,54,54,50,50,46,46,46,46,44,44,42,42,42,42,40,40,0,1212,168,168,148,148,128,128,112,112,108,108,100,100,96,96,96,96,92,92,90,90,86,86,80,80,78,78,74,74,72,72,72,72,72,72,72,72,72,72,70,70,70,70,68,68,68,68,68,68,68,68,68,68,68,68,66,66,66,66,64,64,64,64,0,1276,232,232,166,166,158,158,142,142,138,138,132,132,120,120,116,116,116,116,114,114,108,108,108,108,108,108,100,100,98,98,96,96,96,96,90,90,90,90,84,84,84,84,84,84,80,80,76,76,76,76,76,76,72,72,72,72,72,72,66,66,66,66,0,1340,296,296,220,220,190,190,178,178,168,168,162,162,150,150,144,144,144,144,136,136,126,126,122,122,114,114,110,110,100,100,96,96,96,96,94,94,90,90,90,90,86,86,86,86,82,82,80,80,80,80,78,78,74,74,74,74,70,70,70,70,66,66,0,1404,360,360,252,252,228,228,208,208,202,202,202,202,182,182,168,168,152,152,142,142,136,136,130,130,116,116,110,110,104,104,96,96,96,96,94,94,92,92,90,90,90,90,90,90,88,88,86,86,84,84,80,80,78,78,76,76,70,70,68,68,66,66,0,1468,424,424,316,316,270,270,224,224,196,196,182,182,160,160,144,144,144,144,142,142,136,136,126,126,118,118,112,112,102,102,96,96,96,96,96,96,94,94,88,88,86,86,84,84,82,82,80,80,80,80,80,80,78,78,72,72,70,70,68,68,66,66,0,1532,282,282,254,254,240,240,218,218,200,200,198,198,192,192,142,142,142,142,140,140,118,118,104,104,102,102,100,100,98,98,96,96,90,90,90,90,90,90,90,90,88,88,88,88,88,88,78,78,78,78,78,78,70,70,64,64,64,64,64,64,64,64,0,1596,300,300,254,254,196,196,192,192,170,170,148,148,142,142,132,132,126,126,114,114,112,112,104,104,94,94,92,92,88,88,84,84,82,82,80,80,80,80,76,76,74,74,70,70,66,66,64,64,62,62,62,62,58,58,0,1652,356,356,250,250,222,222,200,200,194,194,184,184,164,164,152,152,142,142,128,128,122,122,100,100,94,94,84,84,84,84,82,82,80,80,80,80,80,80,80,80,78,78,76,76,76,76,72,72,70,70,62,62,60,60,0,1708,412,412,306,306,278,278,256,256,250,250,240,240,220,220,208,208,198,198,132,132,132,132,130,130,128,128,128,128,128,128,128,128,126,126,124,124,124,124,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,0,1788,330,330,324,324,266,266,198,198,196,196,194,194,190,190,188,188,186,186,154,154,154,154,154,154,150,150,150,150,150,150,140,140,134,134,134,134,128,128,120,120,114,114,114,114,108,108,106,106,106,106,106,106,102,102,102,102,102,102,98,98,98,98,98,98,94,94,94,94,94,94,92,92,86,86,86,86,80,80,0,1868,410,410,274,274,272,272,256,256,224,224,224,224,214,214,194,194,188,188,180,180,174,174,162,162,162,162,152,152,148,148,148,148,138,138,126,126,120,120,120,120,120,120,116,116,116,116,110,110,110,110,110,110,104,104,100,100,100,100,100,100,100,100,96,96,96,96,90,90,90,90,90,90,84,84,80,80,80,80,0,1948,490,490,350,350,300,300,288,288,250,250,244,244,230,230,214,214,202,202,172,172,164,164,162,162,150,150,150,150,142,142,134,134,132,132,120,120,120,120,120,120,120,120,118,118,116,116,114,114,110,110,110,110,108,108,106,106,104,104,96,96,94,94,92,92,90,90,90,90,86,86,84,84,82,82,80,80,80,80,0,2028,428,428,378,378,366,366,320,320,242,242,234,234,216,216,194,194,182,182,180,180,176,176,174,174,172,172,166,166,146,146,144,144,136,136,124,124,122,122,120,120,118,118,118,118,118,118,116,116,110,110,110,110,106,106,102,102,102,102,100,100,98,98,98,98,98,98,96,96,90,90,90,90,86,86,82,82,82,82,0,2108,508,508,396,396,318,318,310,310,254,254,242,242,240,240,198,198,186,186,174,174,174,174,156,156,152,152,148,148,146,146,140,140,134,134,134,134,122,122,120,120,120,120,116,116,116,116,116,116,112,112,108,108,108,108,102,102,102,102,96,96,96,96,90,90,90,90,88,88,88,88,84,84,84,84,84,84,80,80,0,2188,588,588,314,314,312,312,220,220,216,216,212,212,210,210,176,176,176,176,156,156,156,156,130,130,130,130,128,128,128,128,112,112,112,112,104,104,104,104,96,96,96,96,96,96,96,96,88,88,88,88,80,80,80,80,72,72,72,72,72,72,72,72,0,2252,652,652,378,378,376,376,284,284,280,280,236,236,236,236,216,216,216,216,190,190,190,190,140,140,140,140,104,104,104,104,96,96,96,96,96,96,96,96,96,96,96,96,92,92,92,92,92,92,92,92,92,92,92,92,76,76,76,76,64,64,64,64,0,2316,716,716,442,442,340,340,296,296,296,296,276,276,246,246,144,144,144,144,144,144,140,140,136,136,136,136,136,136,132,132,96,96,96,96,96,96,92,92,92,92,92,92,92,92,88,88,80,80,80,80,80,80,76,76,76,76,76,76,76,76,72,72,0,2380,780,780,506,506,404,404,184,184,184,184,184,184,180,180,132,132,132,132,132,132,128,128,120,120,120,120,120,120,116,116,96,96,96,96,96,96,96,96,80,80,80,80,80,80,80,80,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,0,2444,844,844,570,570,468,468,248,248,248,248,248,248,244,244,196,196,196,196,196,196,192,192,152,152,152,152,152,152,152,152,136,136,136,136,136,136,136,136,128,128,128,128,128,128,128,128,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,0,2540,560,560,340,340,332,332,284,284,276,276,236,236,232,232,216,216,212,212,204,204,200,200,182,182,182,182,178,178,178,178,174,174,174,174,162,162,162,162,158,158,158,158,154,154,154,154,144,144,140,140,140,140,136,136,136,136,132,132,132,132,128,128,128,128,124,124,124,124,120,120,118,118,118,118,114,114,114,114,110,110,110,110,106,106,106,106,102,102,102,102,98,98,98,98,0,2636,656,656,436,436,428,428,380,380,372,372,266,266,260,260,254,254,238,238,232,232,226,226,216,216,212,212,212,212,208,208,208,208,204,204,178,178,172,172,166,166,158,158,152,152,146,146,144,144,144,144,144,144,144,144,144,144,144,144,132,132,130,130,128,128,124,124,122,122,120,120,120,120,120,120,120,120,120,120,120,120,120,120,108,108,106,106,104,104,100,100,98,98,96,96,0,2732,752,752,354,354,322,322,288,288,284,284,284,284,280,280,246,246,240,240,224,224,218,218,212,212,212,212,212,212,212,212,196,196,194,194,186,186,184,184,184,184,184,184,164,164,152,152,144,144,144,144,136,136,132,132,124,124,124,124,124,124,124,124,122,122,122,122,120,120,120,120,116,116,116,116,116,116,116,116,114,114,114,114,112,112,112,112,112,112,112,112,104,104,100,100,0,2828,848,848,450,450,418,418,384,384,380,380,380,380,376,376,342,342,336,336,320,320,314,314,264,264,264,264,244,244,232,232,224,224,224,224,216,216,212,212,204,204,204,204,204,204,204,204,202,202,202,202,200,200,200,200,176,176,176,176,168,168,164,164,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,128,128,128,128,128,128,128,128,0,2956,500,500,500,500,460,460,436,436,378,378,332,332,304,304,304,304,300,300,296,296,270,270,246,246,246,246,246,246,246,246,242,242,240,240,238,238,220,220,220,220,220,220,218,218,218,218,218,218,218,218,214,214,212,212,210,210,192,192,192,192,192,192,192,192,184,184,184,184,182,182,180,180,178,178,172,172,164,164,164,164,162,162,160,160,158,158,150,150,150,150,150,150,150,150,146,146,144,144,142,142,140,140,140,140,140,140,138,138,138,138,138,138,138,138,134,134,132,132,130,130,128,128,128,128,128,128,0,3084,626,626,560,560,454,454,424,424,414,414,362,362,362,362,360,360,356,356,354,354,328,328,326,326,326,326,324,324,320,320,318,318,292,292,292,292,282,282,276,276,266,266,256,256,250,250,238,238,238,238,236,236,232,232,230,230,220,220,218,218,218,218,216,216,212,212,210,210,200,200,200,200,198,198,196,196,194,194,192,192,190,190,188,188,188,188,186,186,186,186,186,186,180,180,180,180,180,180,178,178,178,178,178,178,172,172,172,172,170,170,168,168,166,166,164,164,162,162,160,160,160,160,158,158,158,158,158,158,152,152,152,152,152,152,150,150,150,150,150,150,144,144,0,3228,702,702,596,596,554,554,502,502,502,502,500,500,464,464,462,462,462,462,460,460,424,424,412,412,382,382,350,350,348,348,322,322,320,320,304,304,294,294,280,280,280,280,264,264,264,264,256,256,250,250,248,248,242,242,240,240,240,240,238,238,228,228,228,228,228,228,226,226,216,216,216,216,214,214,214,214,212,212,212,212,212,212,212,212,208,208,208,208,208,208,208,208,204,204,202,202,198,198,190,190,190,190,182,182,182,182,178,178,174,174,166,166,166,166,158,158,158,158,156,156,154,154,154,154,152,152,152,152,152,152,152,152,148,148,148,148,148,148,148,148,144,144,0,3372,738,738,636,636,600,600,592,592,556,556,544,544,514,514,428,428,418,418,364,364,354,354,352,352,352,352,336,336,336,336,320,320,316,316,308,308,304,304,300,300,296,296,294,294,290,290,262,262,258,258,228,228,224,224,224,224,224,224,216,216,216,216,208,208,206,206,200,200,200,200,196,196,196,196,196,196,196,196,188,188,188,188,178,178,176,176,176,176,176,176,172,172,172,172,168,168,166,166,160,160,160,160,156,156,156,156,156,156,156,156,148,148,148,148,138,138,136,136,136,136,136,136,132,132,132,132,0,3500,866,866,764,764,718,718,548,548,538,538,484,484,474,474,470,470,452,452,436,436,432,432,424,424,414,414,370,370,366,366,336,336,332,332,330,330,320,320,298,298,292,292,292,292,292,292,264,264,258,258,238,238,232,232,232,232,232,232,204,204,198,198,192,192,192,192,192,192,190,190,184,184,184,184,184,184,184,184,182,182,180,180,180,180,180,180,180,180,178,178,172,172,172,172,172,172,172,172,170,170,168,168,162,162,160,160,160,160,160,160,152,152,150,150,142,142,140,140,140,140,140,140,132,132,130,130,0,3628,842,842,660,660,606,606,590,590,548,548,540,540,484,484,442,442,428,428,406,406,398,398,368,368,332,332,330,330,294,294,288,288,282,282,274,274,274,274,270,270,264,264,264,264,254,254,250,250,244,244,238,238,234,234,224,224,208,208,206,206,194,194,192,192,188,188,186,186,186,186,184,184,180,180,180,180,178,178,174,174,172,172,172,172,170,170,168,168,164,164,162,162,160,160,160,160,156,156,154,154,154,154,152,152,148,148,148,148,146,146,142,142,140,140,140,140,138,138,136,136,132,132,130,130,128,128,0,3756,970,970,788,788,716,716,664,664,608,608,566,566,528,528,520,520,410,410,384,384,372,372,346,346,322,322,306,306,304,304,276,276,268,268,254,254,246,246,242,242,240,240,236,236,232,232,230,230,226,226,220,220,218,218,214,214,210,210,208,208,192,192,192,192,192,192,192,192,190,190,188,188,188,188,188,188,186,186,186,186,180,180,174,174,172,172,166,166,162,162,162,162,162,162,154,154,152,152,146,146,142,142,142,142,142,142,140,140,140,140,140,140,138,138,136,136,136,136,136,136,134,134,134,134,128,128,0,3884,840,840,646,646,498,498,486,486,460,460,436,436,420,420,342,342,338,338,324,324,302,302,280,280,274,274,264,264,248,248,246,246,240,240,236,236,236,236,204,204,202,202,196,196,186,186,176,176,172,172,166,166,162,162,162,162,162,162,162,162,162,162,150,150,150,150,146,146,140,140,136,136,132,132,126,126,122,122,122,122,122,122,122,122,122,122,110,110,110,110,106,106,100,100,0,3980,936,936,742,742,594,594,528,528,362,362,356,356,346,346,330,330,314,314,222,222,222,222,220,220,208,208,208,208,204,204,198,198,172,172,172,172,170,170,158,158,158,158,154,154,148,148,144,144,144,144,144,144,144,144,140,140,130,130,130,130,130,130,130,130,126,126,108,108,108,108,106,106,106,106,106,106,106,106,106,106,98,98,98,98,96,96,96,96,96,96,96,96,96,96,0,4076,618,618,452,452,398,398,306,306,286,286,246,246,226,226,208,208,198,198,188,188,178,178,160,160,152,152,140,140,132,132,128,128,122,122,122,122,116,116,116,116,110,110,106,106,100,100,96,96,90,90,90,90,84,84,84,84,78,78,74,74,68,68,0,4140,458,458,366,366,282,282,252,252,242,242,202,202,190,190,168,168,168,168,152,152,148,148,136,136,120,120,120,120,100,100,96,96,92,92,92,92,88,88,86,86,86,86,82,82,82,82,78,78,78,78,74,74,74,74,72,72,68,68,68,68,64,64,0,4204,428,428,162,162,140,140,136,136,130,130,86,86,80,80,80,80,78,78,58,58,56,56,56,56,54,54,34,34,32,32,0,4236,460,460,164,164,158,158,78,78,76,76,50,50,48,48,48,48,48,48,44,44,44,44,36,36,36,36,32,32,32,32,0,4268,186,186,106,106,104,104,72,72,64,64,56,56,56,56,48,48,44,44,44,44,44,44,40,40,36,36,36,36,36,36,0,4300,218,218,80,80,80,80,64,64,64,64,60,60,56,56,48,48,48,48,40,40,40,40,36,36,36,36,36,36,36,36,0,4332,250,250,110,110,94,94,88,88,84,84,76,76,76,76,66,66,62,62,60,60,60,60,56,56,56,56,54,54,54,54,52,52,52,52,52,52,52,52,50,50,50,50,48,48,48,48,0,4380,298,298,158,158,134,134,130,130,122,122,122,122,112,112,104,104,104,104,92,92,78,78,72,72,72,72,72,72,70,70,70,70,70,70,70,70,70,70,68,68,68,68,62,62,52,52,0,4428,346,346,180,180,176,176,168,168,168,168,148,148,148,148,112,112,112,112,108,108,108,108,108,108,108,108,104,104,104,104,80,80,80,80,78,78,78,78,78,78,78,78,76,76,76,76,72,72,72,72,70,70,70,70,70,70,70,70,68,68,68,68,0,4492,410,410,244,244,240,240,232,232,232,232,212,212,212,212,104,104,104,104,102,102,102,102,102,102,102,102,100,100,100,100,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,0,4556,474,474,308,308,304,304,150,150,150,150,148,148,148,148,144,144,144,144,144,144,144,144,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,64,64,64,64,64,64,64,64,0,4620,538,538,210,210,210,210,200,200,200,200,148,148,148,148,140,140,140,140,120,120,120,120,116,116,116,116,96,96,96,96,96,96,96,96,92,92,92,92,88,88,88,88,84,84,84,84,76,76,76,76,72,72,72,72,68,68,68,68,64,64,64,64,0,4684,602,602,274,274,274,274,164,164,164,164,144,144,144,144,144,144,144,144,140,140,140,140,100,100,100,100,96,96,96,96,96,96,96,96,96,96,96,96,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,64,64,64,64,64,64,64,64,0,4748,666,666,338,338,338,338,148,148,148,148,144,144,144,144,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,96,96,96,96,96,96,96,96,80,80,80,80,80,80,80,80,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,72,0,4812,730,730,208,208,208,208,172,172,172,172,172,172,172,172,144,144,144,144,124,124,124,124,108,108,108,108,108,108,108,108,96,96,96,96,92,92,92,92,84,84,84,84,84,84,84,84,80,80,80,80,76,76,76,76,68,68,68,68,68,68,68,68,0,4876,270,270,230,230,228,228,200,200,178,178,158,158,156,156,142,142,136,136,128,128,126,126,118,118,112,112,104,104,102,102,96,96,94,94,90,90,88,88,88,88,86,86,82,82,80,80,78,78,76,76,76,76,74,74,70,70,68,68,68,68,66,66,0,4940,292,292,290,290,262,262,218,218,216,216,202,202,172,172,144,144,136,136,134,134,134,134,126,126,124,124,122,122,108,108,96,96,94,94,94,94,94,94,92,92,92,92,92,92,86,86,80,80,78,78,78,78,78,78,76,76,76,76,76,76,70,70,0,5004,356,356,274,274,260,260,186,186,186,186,178,178,156,156,138,138,138,138,136,136,126,126,120,120,118,118,110,110,110,110,96,96,96,96,90,90,90,90,84,84,84,84,84,84,80,80,76,76,76,76,76,76,72,72,72,72,72,72,66,66,66,66,0,5068,336,336,244,244,190,190,164,164,154,154,140,140,132,132,122,122,108,108,98,98,90,90,88,88,86,86,82,82,76,76,70,70,68,68,68,68,66,66,62,62,56,56,50,50,48,48,0,5116,206,206,196,196,182,182,134,134,126,126,120,120,116,116,110,110,94,94,90,90,84,84,72,72,66,66,66,66,66,66,60,60,60,60,58,58,58,58,58,58,52,52,52,52,52,52,0,5164,242,242,178,178,162,162,158,158,152,152,108,108,100,100,92,92,88,88,88,88,88,88,72,72,70,70,68,68,66,66,66,66,66,66,60,60,58,58,56,56,54,54,54,54,54,54,0,5212,290,290,226,226,196,196,126,126,126,126,96,96,96,96,88,88,86,86,84,84,78,78,72,72,72,72,72,72,68,68,62,62,62,62,54,54,54,54,52,52,52,52,52,52,48,48,0,5260,168,168,168,168,126,126,104,104,88,88,88,88,74,74,64,64,58,58,58,58,54,54,48,48,42,42,42,42,38,38,0,5292,198,198,156,156,134,134,116,116,102,102,84,84,62,62,48,48,46,46,46,46,46,46,44,44,44,44,42,42,36,36,0,5324,162,162,68,68,62,62,40,40,36,36,28,28,24,24,0,5340,178,178,36,36,32,32,24,24,24,24,16,16,16,16,0,5356,194,194,36,36,36,36,24,24,24,24,20,20,20,20,0,5372,50,50,34,34,28,28,24,24,22,22,18,18,16,16,0,5388,40,40,36,36,24,24,24,24,20,20,20,20,16,16,0,5404,56,56,28,28,24,24,24,24,24,24,16,16,16,16,0,5420,42,42,36,36,26,26,24,24,22,22,20,20,18,18,0,5436,50,50,32,32,26,26,24,24,22,22,18,18,16,16,0,5452,66,66,48,48,42,42,40,40,38,38,34,34,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,5484,78,78,64,64,56,56,54,54,52,52,52,52,50,50,48,48,46,46,42,42,40,40,38,38,36,36,36,36,34,34,0,5516,110,110,68,68,66,66,40,40,40,40,28,28,28,28,0,5532,82,82,50,50,36,36,24,24,22,22,18,18,16,16,0,5548,48,48,36,36,24,24,24,24,20,20,20,20,16,16,0,5564,36,36,30,30,30,30,24,24,20,20,18,18,18,18,0,5580,44,44,44,44,38,38,30,30,30,30,28,28,26,26,26,26,26,26,24,24,24,24,0,5604,68,68,68,68,62,62,54,54,54,54,36,36,36,36,36,36,36,36,36,36,36,36,0,5628,90,90,84,84,74,74,56,56,54,54,54,54,52,52,40,40,38,38,38,38,36,36,36,36,34,34,34,34,32,32,0,5660,114,114,80,80,76,76,60,60,56,56,56,56,52,52,48,48,46,46,42,42,40,40,38,38,36,36,36,36,34,34,0,5692,110,110,88,88,76,76,72,72,64,64,58,58,50,50,48,48,46,46,44,44,40,40,40,40,38,38,36,36,32,32,0,5724,118,118,100,100,84,84,68,68,60,60,56,56,48,48,48,48,46,46,44,44,42,42,38,38,36,36,34,34,32,32,0,5756,150,150,96,96,88,88,72,72,70,70,58,58,56,56,48,48,48,48,44,44,44,44,40,40,40,40,36,36,36,36,0,5788,126,126,118,118,98,98,70,70,58,58,52,52,52,52,48,48,46,46,46,46,44,44,38,38,34,34,32,32,32,32,0,5820,158,158,128,128,86,86,80,80,74,74,72,72,68,68,56,56,54,54,52,52,52,52,50,50,48,48,48,48,46,46,46,46,44,44,42,42,42,42,0,5860,198,198,168,168,110,110,108,108,104,104,74,74,74,74,62,62,62,62,60,60,60,60,60,60,56,56,56,56,56,56,46,46,46,46,40,40,40,40,0,5900,238,238,208,208,150,150,148,148,144,144,92,92,92,92,92,92,88,88,88,88,88,88,64,64,64,64,64,64,64,64,64,64,64,64,56,56,56,56,56,56,56,56,56,56,56,56,0,5948,286,286,256,256,124,124,124,124,124,124,94,94,94,94,94,94,86,86,86,86,86,86,72,72,72,72,72,72,60,60,60,60,60,60,54,54,54,54,54,54,54,54,54,54,54,54,0,5996,302,302,170,170,168,168,138,138,136,136,126,126,110,110,108,108,96,96,94,94,88,88,86,86,84,84,76,76,74,74,74,74,72,72,72,72,70,70,68,68,66,66,64,64,64,64,62,62,62,62,60,60,58,58,0,6052,358,358,226,226,224,224,194,194,192,192,182,182,166,166,164,164,152,152,150,150,144,144,142,142,140,140,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,84,0,6108,276,276,242,242,232,232,212,212,200,200,190,190,126,126,122,122,120,120,120,120,118,118,118,118,116,116,84,84,80,80,78,78,78,78,76,76,76,76,74,74,70,70,66,66,64,64,64,64,62,62,62,62,60,60,0,6164,332,332,298,298,288,288,268,268,160,160,158,158,108,108,106,106,102,102,98,98,96,96,96,96,94,94,84,84,84,84,84,84,84,84,84,84,70,70,70,70,60,60,60,60,60,60,60,60,60,60,60,60,60,60,0,6220,352,352,206,206,156,156,148,148,140,140,124,124,122,122,102,102,92,92,90,90,88,88,80,80,78,78,72,72,72,72,70,70,68,68,64,64,62,62,56,56,56,56,54,54,52,52,0,6268,252,252,192,192,166,166,142,142,128,128,112,112,104,104,98,98,90,90,82,82,76,76,72,72,70,70,68,68,66,66,64,64,62,62,58,58,56,56,54,54,52,52,50,50,48,48,0,6316,300,300,212,212,188,188,146,146,140,140,122,122,116,116,112,112,110,110,104,104,102,102,90,90,88,88,82,82,80,80,80,80,80,80,78,78,78,78,74,74,74,74,72,72,72,72,72,72,72,72,70,70,70,70,66,66,66,66,64,64,64,64,0,6380,364,364,276,276,252,252,210,210,184,184,138,138,128,128,112,112,108,108,108,108,108,108,106,106,106,106,102,102,98,98,96,96,96,96,96,96,96,96,96,96,94,94,82,82,80,80,70,70,68,68,68,68,68,68,68,68,68,68,68,68,66,66,0,6444,338,338,270,270,244,244,198,198,188,188,172,172,168,168,166,166,162,162,148,148,146,146,144,144,142,142,130,130,128,128,118,118,116,116,114,114,112,112,104,104,102,102,100,100,100,100,100,100,100,100,100,100,100,100,98,98,96,96,92,92,90,90,88,88,88,88,88,88,88,88,88,88,88,88,86,86,84,84,0,6524,418,418,350,350,324,324,248,248,244,244,242,242,238,238,224,224,222,222,220,220,218,218,190,190,188,188,186,186,184,184,164,164,164,164,136,136,136,136,120,120,120,120,120,120,120,120,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,112,112,112,112,112,112,112,112,104,104,104,104,88,88,88,88,0,6604,498,498,430,430,404,404,328,328,324,324,322,322,318,318,196,196,196,196,180,180,180,180,180,180,180,180,176,176,176,176,176,176,176,176,128,128,128,128,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,80,80,80,80,0,6684,480,480,398,398,390,390,268,268,248,248,248,248,242,242,240,240,188,188,178,178,178,178,176,176,174,174,150,150,150,150,146,146,144,144,142,142,122,122,120,120,116,116,114,114,112,112,112,112,108,108,108,108,106,106,104,104,100,100,98,98,98,98,96,96,94,94,90,90,90,90,86,86,84,84,82,82,82,82,0,6764,476,476,468,468,324,324,324,324,242,242,240,240,216,216,216,216,208,208,206,206,182,182,174,174,172,172,166,166,166,166,144,144,142,142,138,138,138,138,130,130,128,128,124,124,122,122,122,122,120,120,120,120,110,110,110,110,110,110,110,110,108,108,108,108,106,106,104,104,104,104,102,102,102,102,92,92,92,92,92,92,92,92,90,90,90,90,0,6852,554,554,410,410,326,326,298,298,288,288,260,260,248,248,242,242,218,218,210,210,200,200,188,188,182,182,170,170,168,168,164,164,158,158,152,152,140,140,138,138,134,134,132,132,130,130,130,130,128,128,126,126,124,124,122,122,120,120,120,120,118,118,116,116,114,114,110,110,106,106,104,104,102,102,100,100,98,98,94,94,92,92,90,90,88,88,0,6940,642,642,498,498,414,414,374,374,346,346,334,334,328,328,304,304,284,284,264,264,252,252,250,250,246,246,232,232,220,220,218,218,214,214,212,212,210,210,210,210,208,208,202,202,200,200,198,198,198,198,196,196,190,190,180,180,178,178,176,176,174,174,166,166,164,164,162,162,160,160,160,160,160,160,160,160,160,160,158,158,158,158,158,158,158,158,158,158,156,156,154,154,154,154,154,154,154,154,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,150,150,150,150,150,150,150,150,150,150,148,148,146,146,146,146,146,146,146,146,144,144,144,144,144,144,144,144,0,7084,786,786,642,642,438,438,418,418,358,358,346,346,344,344,340,340,328,328,322,322,320,320,318,318,318,318,296,296,294,294,292,292,290,290,262,262,260,260,260,260,260,260,260,260,252,252,252,252,252,252,252,252,242,242,242,242,242,242,230,230,228,228,216,216,216,216,216,216,216,216,216,216,216,216,216,216,206,206,206,206,198,198,198,198,198,198,198,198,192,192,192,192,192,192,192,192,192,192,188,188,188,188,188,188,188,188,174,174,174,174,174,174,174,174,174,174,170,170,170,170,170,170,170,170,162,162,162,162,162,162,152,152,152,152,144,144,144,144,144,144,144,144,0,7228,930,930,786,786,498,498,486,486,484,484,480,480,426,426,424,424,422,422,420,420,372,372,372,372,372,372,372,372,344,344,342,342,322,322,322,322,322,322,300,300,300,300,300,300,300,300,280,280,280,280,280,280,280,280,252,252,252,252,252,252,252,252,228,228,228,228,212,212,212,212,212,212,208,208,208,208,208,208,208,208,198,198,198,198,198,198,198,198,188,188,188,188,188,188,188,188,182,182,182,182,174,174,174,174,174,174,170,170,170,170,170,170,170,170,160,160,160,160,160,160,160,160,150,150,150,150,150,150,150,150,144,144,144,144,0,7364,920,920,614,614,546,546,490,490,434,434,432,432,406,406,380,380,346,346,298,298,292,292,292,292,290,290,280,280,280,280,278,278,268,268,268,268,266,266,260,260,260,260,250,250,244,244,244,244,242,242,232,232,232,232,230,230,220,220,220,220,218,218,212,212,212,212,204,204,202,202,198,198,192,192,186,186,180,180,178,178,174,174,168,168,162,162,154,154,152,152,152,152,150,150,150,150,150,150,148,148,148,148,148,148,146,146,146,146,146,146,144,144,142,142,142,142,140,140,140,140,140,140,138,138,138,138,138,138,136,136,136,136,136,136,0,7500,1056,1056,622,622,534,534,508,508,416,416,416,416,414,414,404,404,404,404,402,402,378,378,378,378,368,368,326,326,326,326,324,324,306,306,304,304,284,284,268,268,262,262,242,242,242,242,240,240,240,240,240,240,238,238,230,230,230,230,228,228,210,210,210,210,208,208,204,204,204,204,200,200,196,196,196,196,192,192,192,192,192,192,192,192,192,192,192,192,186,186,186,186,186,186,174,174,174,174,174,174,170,170,170,170,166,166,162,162,162,162,158,158,158,158,158,158,158,158,158,158,158,158,152,152,152,152,152,152,140,140,140,140,140,140,0,7636,1192,1192,758,758,498,498,498,498,374,374,368,368,348,348,348,348,346,346,346,346,346,346,344,344,330,330,312,312,312,312,310,310,292,292,292,292,288,288,288,288,288,288,288,288,288,288,288,288,278,278,266,266,266,266,266,266,262,262,262,262,258,258,228,228,228,228,204,204,204,204,204,204,188,188,188,188,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,170,170,170,170,170,170,170,170,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,160,160,160,160,160,160,160,160,160,160,160,160,160,160,144,144,144,144,0,7772,1328,1328,504,504,498,498,478,478,478,478,476,476,476,476,476,476,474,474,440,440,440,440,438,438,390,390,368,368,368,368,304,304,304,304,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,268,262,262,262,262,262,262,236,236,230,230,230,230,200,200,200,200,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,194,192,192,192,192,192,192,176,176,170,170,170,170,164,164,164,164,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,156,156,156,156,156,156,140,140,134,134,134,134,0,7900,1456,1456,632,632,626,626,606,606,600,600,558,558,556,556,484,484,484,484,420,420,420,420,384,384,384,384,384,384,380,380,368,368,368,368,334,334,334,334,288,288,288,288,286,286,286,286,284,284,264,264,232,232,232,232,230,230,230,230,228,228,208,208,192,192,192,192,192,192,192,192,192,192,188,188,182,182,182,182,180,180,180,180,180,180,180,180,180,180,180,180,180,180,176,176,170,170,170,170,168,168,168,168,158,158,158,158,156,156,156,156,156,156,152,152,138,138,138,138,136,136,136,136,136,136,132,132,0,8028,758,758,722,722,676,676,604,604,538,538,500,500,492,492,478,478,444,444,396,396,390,390,366,366,334,334,328,328,304,304,288,288,286,286,278,278,270,270,268,268,266,266,264,264,256,256,248,248,246,246,234,234,228,228,222,222,208,208,202,202,196,196,192,192,190,190,186,186,184,184,184,184,182,182,180,180,176,176,174,174,174,174,172,172,168,168,166,166,166,166,162,162,160,160,160,160,158,158,154,154,152,152,152,152,150,150,148,148,144,144,142,142,142,142,140,140,136,136,134,134,134,134,130,130,128,128,0,8156,848,848,728,728,662,662,614,614,564,564,516,516,510,510,452,452,446,446,400,400,382,382,372,372,354,354,322,322,292,292,284,284,276,276,268,268,260,260,246,246,236,236,236,236,228,228,224,224,222,222,214,214,210,210,208,208,204,204,200,200,196,196,192,192,190,190,188,188,188,188,186,186,184,184,184,184,184,184,182,182,182,182,178,178,176,176,172,172,170,170,164,164,160,160,158,158,156,156,152,152,150,150,144,144,140,140,140,140,138,138,136,136,136,136,134,134,132,132,132,132,132,132,130,130,130,130,0,8284,736,736,686,686,630,630,572,572,486,486,468,468,436,436,376,376,368,368,354,354,332,332,328,328,326,326,308,308,292,292,288,288,276,276,274,274,272,272,270,270,254,254,252,252,246,246,228,228,226,226,220,220,210,210,208,208,208,208,200,200,194,194,192,192,186,186,186,186,184,184,184,184,178,178,178,178,178,178,172,172,172,172,172,172,168,168,168,168,168,168,164,164,160,160,160,160,154,154,154,154,152,152,152,152,146,146,146,146,146,146,140,140,140,140,140,140,136,136,136,136,136,136,132,132,128,128,0,8412,586,586,492,492,468,468,446,446,442,442,440,440,422,422,400,400,354,354,328,328,318,318,308,308,306,306,306,306,298,298,280,280,280,280,278,278,278,278,272,272,270,270,262,262,240,240,232,232,232,232,230,230,230,230,224,224,222,222,214,214,192,192,192,192,182,182,180,180,178,178,178,178,178,178,178,178,178,178,176,176,166,166,164,164,162,162,162,162,162,162,162,162,162,162,158,158,158,158,158,158,158,158,158,158,156,156,154,154,144,144,142,142,142,142,142,142,142,142,142,142,140,140,138,138,128,128,0,8540,714,714,594,594,572,572,544,544,446,446,420,420,420,420,390,390,374,374,342,342,334,334,330,330,330,330,324,324,312,312,288,288,278,278,272,272,272,272,268,268,250,250,244,244,244,244,236,236,228,228,214,214,212,212,210,210,210,210,210,210,204,204,192,192,192,192,190,190,190,190,186,186,182,182,178,178,178,178,174,174,168,168,166,166,166,166,164,164,164,164,164,164,162,162,160,160,160,160,158,158,158,158,154,154,150,150,146,146,146,146,142,142,136,136,134,134,134,134,132,132,132,132,132,132,130,130,0,8668,842,842,722,722,700,700,544,544,512,512,496,496,464,464,450,450,450,450,430,430,378,378,360,360,352,352,314,314,308,308,274,274,270,270,264,264,246,246,240,240,234,234,234,234,232,232,232,232,216,216,210,210,204,204,202,202,198,198,198,198,194,194,192,192,192,192,192,192,192,192,188,188,186,186,186,186,186,186,184,184,184,184,182,182,174,174,174,174,172,172,166,166,162,162,152,152,152,152,150,150,144,144,140,140,138,138,138,138,138,138,138,138,134,134,132,132,132,132,132,132,130,130,130,130,128,128,0,8796,970,970,826,826,670,670,638,638,622,622,590,590,574,574,480,480,432,432,390,390,378,378,352,352,346,346,346,346,342,342,326,326,320,320,314,314,312,312,306,306,298,298,298,298,296,296,292,292,290,290,290,290,290,290,286,286,272,272,262,262,246,246,242,242,230,230,228,228,228,228,226,226,222,222,220,220,220,220,220,220,216,216,212,212,212,212,210,210,210,210,210,210,210,210,210,210,208,208,204,204,202,202,200,200,198,198,196,196,196,196,196,196,194,194,194,194,194,194,194,194,194,194,192,192,190,190,190,190,188,188,188,188,188,188,188,188,188,188,186,186,182,182,180,180,178,178,176,176,174,174,174,174,174,174,172,172,172,172,172,172,172,172,172,172,170,170,0,8964,1138,1138,994,994,838,838,806,806,790,790,758,758,538,538,512,512,452,452,444,444,444,444,442,442,438,438,436,436,436,436,436,436,380,380,368,368,340,340,318,318,314,314,312,312,310,310,302,302,302,302,300,300,300,300,300,300,300,300,300,300,276,276,272,272,270,270,268,268,260,260,260,260,258,258,258,258,258,258,258,258,258,258,252,252,252,252,252,252,252,252,252,252,252,252,252,252,244,244,244,244,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,222,222,222,222,208,208,194,194,194,194,194,194,194,194,190,190,190,190,190,190,190,190,190,190,190,190,190,190,174,174,174,174,174,174,174,174,170,170,170,170,170,170,170,170,170,170,170,170,170,170,0,9132,1160,1160,1004,1004,954,954,922,922,702,702,614,614,606,606,602,602,598,598,594,594,594,594,538,538,496,496,474,474,462,462,452,452,446,446,418,418,406,406,396,396,390,390,380,380,378,378,378,378,376,376,376,376,368,368,352,352,352,352,350,350,350,350,348,348,348,348,340,340,324,324,310,310,306,306,300,300,296,296,276,276,272,272,266,266,262,262,256,256,254,254,254,254,252,252,252,252,252,252,250,250,250,250,248,248,248,248,246,246,246,246,246,246,244,244,244,244,240,240,238,238,234,234,230,230,226,226,224,224,220,220,216,216,214,214,214,214,212,212,212,212,212,212,210,210,210,210,208,208,208,208,206,206,206,206,206,206,204,204,204,204,200,200,198,198,194,194,190,190,186,186,184,184,180,180,0,9308,1178,1178,872,872,768,768,758,758,758,758,658,658,636,636,624,624,614,614,544,544,530,530,526,526,526,526,500,500,500,500,496,496,482,482,430,430,410,410,406,406,400,400,384,384,380,380,380,380,376,376,376,376,372,372,366,366,346,346,342,342,338,338,336,336,326,326,322,322,316,316,308,308,304,304,304,304,300,300,300,300,296,296,294,294,268,268,264,264,262,262,258,258,254,254,252,252,252,252,250,250,250,250,250,250,250,250,242,242,240,240,238,238,238,238,236,236,236,236,234,234,230,230,222,222,222,222,222,222,222,222,218,218,216,216,216,216,214,214,214,214,212,212,208,208,200,200,200,200,200,200,200,200,198,198,196,196,192,192,188,188,186,186,186,186,184,184,184,184,184,184,184,184,176,176,0,9484,1354,1354,1048,1048,932,932,932,932,832,832,810,810,798,798,788,788,718,718,704,704,668,668,664,664,650,650,576,576,572,572,566,566,550,550,536,536,532,532,526,526,500,500,496,496,494,494,460,460,402,402,400,400,396,396,388,388,388,388,386,386,386,386,386,386,386,386,378,378,376,376,366,366,364,364,360,360,350,350,350,350,350,350,346,346,336,336,334,334,330,330,320,320,320,320,320,320,302,302,276,276,276,276,276,276,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,268,268,268,268,268,268,266,266,266,266,266,266,266,266,260,260,260,260,260,260,258,258,258,258,258,258,252,252,238,238,238,238,238,238,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,236,230,230,230,230,230,230,228,228,228,228,228,228,228,228,222,222,222,222,222,222,220,220,220,220,220,220,214,214,0,9684,1554,1554,1248,1248,1132,1132,1132,1132,1008,1008,984,984,914,914,758,758,670,670,632,632,574,574,572,572,568,568,560,560,560,560,556,556,554,554,546,546,508,508,466,466,446,446,408,408,406,406,402,402,396,396,396,396,396,396,394,394,392,392,392,392,386,386,386,386,386,386,384,384,382,382,348,348,346,346,342,342,336,336,336,336,336,336,334,334,332,332,332,332,326,326,326,326,326,326,324,324,322,322,300,300,300,300,300,300,300,300,300,300,298,298,296,296,296,296,286,286,274,274,272,272,272,272,272,272,272,272,272,272,272,272,270,270,268,268,268,268,258,258,246,246,244,244,234,234,232,232,228,228,228,228,228,228,228,228,228,228,226,226,226,226,226,226,226,226,226,226,226,226,224,224,212,212,210,210,206,206,206,206,206,206,206,206,206,206,204,204,204,204,204,204,204,204,204,204,204,204,202,202,0,9884,1446,1446,1330,1330,1178,1178,1108,1108,952,952,864,864,826,826,764,764,748,748,744,744,582,582,578,578,570,570,566,566,562,562,554,554,550,550,512,512,496,496,494,494,488,488,480,480,478,478,472,472,450,450,448,448,448,448,440,440,440,440,430,430,418,418,416,416,414,414,410,410,408,408,358,358,354,354,352,352,350,350,346,346,344,344,342,342,326,326,316,316,314,314,310,310,308,308,306,306,302,302,300,300,298,298,298,298,294,294,294,294,294,294,294,294,294,294,292};int sum[]={0,0,1,0,2,1,0,0,3,2,0,0,4,3,1,1,0,0,0,0,5,4,1,1,0,0,0,0,6,5,1,1,0,0,0,0,7,6,2,2,0,0,0,0,8,7,1,1,0,0,0,0,9,8,1,1,0,0,0,0,10,9,2,2,1,1,1,1,0,0,0,0,0,0,0,0,11,10,2,2,1,1,1,1,0,0,0,0,0,0,0,0,12,11,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,159,8,8,7,7,6,6,6,6,5,5,4,4,4,4,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};int main(void){ freopen("quiz.in","r",stdin),freopen("quiz.out","w",stdout); register int i,j; cin>>n; while(fa[n]) { putchar('1'); for (i=1;i<=sum[n];++i) putchar('0'); n-=fa[n]; } putchar('1'); for (i=1;i<=sum[n];++i) putchar('0'); fclose(stdin),fclose(stdout); return 0;}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表