CodeGolf.SE에 대한 사용자 권한 계산


15

도전

목표는 이벤트 목록 (예 : 공감, 공감 등)을 취하는 가능한 가장 짧은 프로그램을 작성하고 사용자의 평판과 그가 얻은 특권을 반환하는 것입니다.

어떤 종류의 이벤트?

평판 순서대로 나열된 이벤트 차트는 다음과 같습니다.

-15 answer unaccepted
-10 answer unupvoted
-5  question unupvoted
-2  answer downvoted
-2  question downvoted
-2  unaccept answer
-1  downvote answer
+1  join website
+1  undownvote answer
+2  accept answer
+2  question undownvoted
+2  answer undownvoted
+5  question upvoted
+10 answer upvoted
+15 answer accepted
+100 association bonus

어떤 종류의 특권?

필요한 평판 순서대로 권한 목록이 있습니다.

1 create posts
5 participate in meta
10 remove new user restrictions
10 create wiki posts
15 vote up
15 flag posts
20 talk in chat
50 comment everywhere
75 set bounties
100 edit community wiki
100 create chat rooms
125 vote down
150 create tags
200 retag questions
250 view close votes
500 cast close and reopen votes
750 established user
1000 edit questions and answers
1000 create gallery chat rooms
1250 create tag synonyms
1500 approve tag wiki edits
2000 access to moderator tools
3500 protect questions
4000 trusted user

입력

입력 (STDIN)은 행당 하나씩 이벤트 목록이며, 첫 번째 차트에서 이벤트가 어떻게 나타나는지 (평판 금액 제외)입니다. 빈 줄은 입력 끝을 나타냅니다. 다음은 예입니다 (끝에 빈 줄이 있어야 함).

join website
association bonus
answer upvoted
answer upvoted
question upvoted
answer accepted
answer upvoted
accept answer
unaccept answer
question unupvoted
accept answer
question upvoted

산출

STDOUT에 대한 첫 번째 출력 행은 누적 된 rep의 이름을 지정해야합니다. 그 후의 각 줄에는 표시된대로 정확하게 두 번째 차트와 같은 순서로 획득 한 하나의 권한이 나열되어야합니다. 위 입력에 대한 예상 출력 :

153 reputation
1 create posts
5 participate in meta
10 remove new user restrictions
10 create wiki posts
15 vote up
15 flag posts
20 talk in chat
50 comment everywhere
75 set bounties
100 edit community wiki
100 create chat rooms
125 vote down
150 create tags

규칙, 제한 및 참고

이것은 코드 골프입니다. 표준 코드 골프 규칙이 적용됩니다.

(편집 : 파일에 액세스하는 두 개의 항목이 있으므로 코드 골프에 대한 표준 규칙의 일부로 파일 길이를 코드 길이에 추가해야한다고 지적하고 싶습니다)


“입력 끝의 빈 줄”은 입력이 두 개의 줄 바꿈 문자로 끝나 거나 단일 문자로 끝나는 것을 의미 합니까?
MvG

@ MvG : 하나의 단일 라인 끝을 가정합니다.
Konrad Borowski

"빈 줄"은 일반적으로 두 줄 바꿈 문자를 의미합니다.
Tobia

협회 보너스는 특정 권한에 포함되지 않지만,이 도전에 대해서는 무시할 수 있다고 가정합니다.
HyperNeutrino

답변:


11

GolfScript ( 569 개 568 475 개 473 문자)

이것은 인쇄 할 수없는 문자를 사용하여 필요한 문자열을 압축하므로 xxd 형식입니다.

0000000: 305c 6e2f 7b2e 2775 6e27 2f27 272a 2e2d  0\n/{.'un'/''*.-
0000010: 3162 6173 6527 6e3f 696d 646f 700a 705f  1base'n?imdop.p_
0000020: 6c27 3132 2a3d 3131 302d 4040 3d7b 7e29  l'12*=110-@@={~)
0000030: 7d2a 2b7d 2f3a 5e2e 6e27 7978 0a51 b318  }*+}/:^.n'yx.Q..
0000040: 34fd e3ad 76f0 9f48 a7db efe2 2e06 9a7a  4...v..H.......z
0000050: 0733 c726 2c43 7e1c 4bf6 bbbc dae7 3bd8  .3.&,C~.K.....;.
0000060: 835b d3b5 23ed c195 f733 6257 0741 296e  .[..#....3bW.A)n
0000070: a97c b473 e67b 3f95 5218 0256 8c58 067c  .|.s.{?.R..V.X.|
0000080: 1358 e5a6 0e7a 2894 3f26 9d0f afbc 0697  .X...z(.?&......
0000090: 9048 7845 0041 d335 0c6f e88b 0b97 e9d9  .HxE.A.5.o......
00000a0: d840 6808 c17d c1b2 5e79 f423 2436 dc33  .@h..}..^y.#$6.3
00000b0: 8da5 03d8 f563 f61a 7687 cff9 d489 24de  .....c..v.....$.
00000c0: 5a70 4966 e614 d632 d4ba c9e4 5b1e f561  ZpIf...2....[..a
00000d0: 9308 215f b7bc f475 edc0 1686 a212 d4d0  ..!_...u........
00000e0: 75c6 bab8 c4a0 1c85 d0b8 7f3f 53d1 8920  u..........?S.. 
00000f0: 3923 895f 15d5 6c2e 965e c295 62c7 00cd  9#._..l..^..b...
0000100: 8b46 6e2a 3d7b 9ac3 7f90 e526 b960 dbe5  .Fn*={.....&.`..
0000110: 5242 defa 24cf 5976 8378 f958 34f6 657d  RB..$.Yv.x.X4.e}
0000120: 41da 28a9 cc4f 3930 dd25 d982 3b67 9400  A.(..O90.%..;g..
0000130: 3a19 cf72 6ae9 3c19 ee5a 6fd2 ef52 e29c  :..rj.<..Zo..R..
0000140: 4872 8a86 c243 dcc1 23b1 7958 dcbc 307d  Hr...C..#.yX..0}
0000150: 7c26 67d3 dd6a fbd2 1680 4de3 156b 8a4d  |&g..j....M..k.M
0000160: ad31 d6fa 08ca 92a7 76d4 8e6e 8b71 167f  .1......v..n.q..
0000170: 3582 9d84 8038 d6c1 da9d 8b30 1805 c1aa  5....8.....0....
0000180: b05d dfe2 4474 b26f 14be fc7f ccba c499  .]..Dt.o........
0000190: 856a c31f c361 90f1 8c27 3235 3662 6173  .j...a...'256bas
00001a0: 6520 3134 3962 6173 655b 305d 2f28 3236  e 149base[0]/(26
00001b0: 2c7b 5c5b 3124 295d 2f5c 3224 3d2a 7d2f  ,{\[1$)]/\2$=*}/
00001c0: 5c2c 297b 2d7d 2b25 2b6e 257b 2761 272d  \,){-}+%+n%{'a'-
00001d0: 7e5e 5c3c 217d 2c6e 2a                   ~^\<!},n*

모듈로 문자열 압축, 프로그램은

0\n/{.'un'/''*.-1base'n?imdop
p_l'12*=110-@@={~)}*+}/:^.'
 reputation
1 create posts
5 participate in meta
10 remove new user restrictions
10 create wiki posts
15 vote up
15 flag posts
20 talk in chat
50 comment everywhere
75 set bounties
100 edit community wiki
100 create chat rooms
125 vote down
150 create tags
200 retag questions
250 view close votes
500 cast close and reopen votes
750 established user
1000 edit questions and answers
1000 create gallery chat rooms
1250 create tag synonyms
1500 approve tag wiki edits
2000 access to moderator tools
3500 protect questions
4000 trusted user'n%{'a'-~^\<!},n*

대부분의 측면에서 사소한 것이지만 두 가지 관심 분야가 있습니다.

첫 번째는 입력 문자열에 대한 해시 함수입니다. 해시 함수가 9 (한 번만 un제거) 다른 문자열 각각에 대해 고유 한 결과를 생성하는 간단한 방법에 놀랐 습니다. 또한 보너스로 빈 문자열에 대해 다른 결과를 생성하여 최종 빈 줄을 스트립에서 제거합니다. 입력.

개별 라인의 담당자 계산은 다음과 같습니다.

.'un'/''*.-1base'n?imdop
p_l'12*=110-@@={~)}*

먼저 un문자열에서 제거 하고 찾은지를 기록합니다. 그런 다음 슈퍼 간단한 해시 함수를 적용합니다 h(s) = ( sum over i: (-1)^i s[i] ) % 11. (내가 그것을 발견했을 때 왜 놀랐는지 알 수 있습니다). 끈

'n?imdop
p_l'

해시 값을 rep의 변경 사항 (ASCII 값에서 110을 뺀 값)에 매핑 한 조회 테이블이며 un, 시작시 발견 되면 변경을 무효화합니다.

두 번째 관심 지점은 권한에 대한 필터입니다. 나는 조금 더 간단한 것을 시도했다.

{~^\<!},

평판과 비교할 점수를 얻기 위해 (정의되지 않은 단어는 아무 것도하지 않음)를 평가합니다 ^. 그것은 거의 작동합니다. 그것을 깨는 것은 and일부 문자열에서 발생하며 미리 정의 된 함수입니다. 해결 방법 : and더 이상 발생하지 않을 정도로 선을 gle 으십시오 . (공백을 제거하는 것이 문자를 제거하는 것보다 낫지 만 a길이와는 아무런 차이가 없습니다).


1
더 나은 대체 테이블에 대한 탐욕스러운 검색은 실제로 내 임시 접근 방식보다 한 문자 더 나쁩니다. 메모리가 부족하기 전에 탐욕스럽지 않은 접근 방식을 완성하기 위해 휴리스틱 작업을 계속하고 있습니다.
Peter Taylor

대박. 평판을 어떻게 계산하는지조차 알 수 없습니다.
Lowjacker

8

루비 1.9.3, (514) 467 (459 507 460 플래그 452 + 7)

로 실행하십시오 ruby -rzlib <program>.

#coding:binary
r=0
$<.each{|l|b=l.sub!('un','')?-1:1
r+=('cvuwdsaifo'[/.#{l[9]||break}/].ord-2)*b}
puts"#{r} reputation"
Zlib.inflate('xÚ]QKrà Ýû:BìÖ“ó(XM˜`D‘lo_‰ÒL¦;ÐÓûÁ¡*AaQf(X5†X|3¬¤8Œ¨´òNé€M¨Ú]´Æ ‘³8ÞUŽøŒ]jœagmÅ_ ï˜. ˜ž®¨Ãll^WÊ
´S=U®3)ÜxËÉ=.@KÔ¶»å¨g3kónîjP™WÛžºûÂG6ÿ׎âÝx!;Â÷f=Z‡ÉvöhõBb¡F¶çpqíCÌ‹ñ¸PîøÕH&€·åAK{OÔ£¾Ô³TåïqUþý=-È™9Ÿx,¥úG8ÒÛZ#ÃB P†•ª¨\\íÂI†§Q)¼¥>¥uýËþ²d').lines{|l|l.to_i<=r&&$><<l}

이진 문자열 리터럴이 제대로 붙여 넣지 않은 경우 (아마 그렇지 않은 경우) 다음은 16 진 덤프입니다.

0000: 23 63 6F 64 69 6E 67 3A 62 69 6E 61 72 79 0A 72   #coding:binary.r
0010: 3D 30 0A 24 3C 2E 65 61 63 68 7B 7C 6C 7C 62 3D   =0.$<.each{|l|b=
0020: 6C 2E 73 75 62 21 28 27 75 6E 27 2C 27 27 29 3F   l.sub!('un','')?
0030: 2D 31 3A 31 0A 72 2B 3D 28 27 11 63 0C 76 07 75   -1:1.r+=('.c.v.u
0040: 00 77 00 64 04 73 01 61 03 69 66 6F 27 5B 2F 2E   .w.d.s.a.ifo'[/.
0050: 23 7B 6C 5B 39 5D 7C 7C 62 72 65 61 6B 7D 2F 5D   #{l[9]||break}/]
0060: 2E 6F 72 64 2D 32 29 2A 62 7D 0A 70 75 74 73 22   .ord-2)*b}.puts"
0070: 23 7B 72 7D 20 72 65 70 75 74 61 74 69 6F 6E 22   #{r} reputation"
0080: 0A 5A 6C 69 62 2E 69 6E 66 6C 61 74 65 28 27 78   .Zlib.inflate('x
0090: DA 5D 51 4B 72 C3 20 0C DD FB 14 3A 42 EC D6 93   .]QKr. ....:B...
00A0: F3 28 58 4D 98 60 44 91 6C 8F 6F 5F 89 D2 4C A6   .(XM.`D.l.o_..L.
00B0: 3B D0 D3 FB C1 08 A1 12 2A 41 61 51 19 66 28 58   ;.......*AaQ.f(X
00C0: 35 86 58 7C 16 33 AC A4 38 8C 17 A8 B4 F2 4E 90   5.X|.3..8.....N.
00D0: E9 80 4D A8 DA 5D B4 C6 A0 91 B3 38 DE 55 8E F8   ..M..].....8.U..
00E0: 8C 5D 6A 9C 61 67 1B 6D C5 8F 5F 09 EF 1D 98 2E   .]j.ag.m.._.....
00F0: A0 98 9E AE 1E 1E A8 C3 6C 6C 5E 57 CA 0A B4 53   ........ll^W...S
0100: 3D 8F 07 55 1A AE 33 08 29 DC 78 CB 1A C9 3D 2E   =..U..3.).x...=.
0110: 40 4B D4 B6 BB E5 A8 67 33 6B F3 6E EE 6A 50 99   @K.....g3k.n.jP.
0120: 57 DB 9E BA FB C2 47 36 FF D7 8E E2 DD 13 78 21   W.....G6......x!
0130: 3B C2 F7 66 3D 5A 87 C9 76 F6 68 F5 42 62 A1 46   ;..f=Z..v.h.Bb.F
0140: B6 E7 70 71 14 ED 43 CC 8B F1 B8 50 EE F8 D5 48   ..pq..C....P...H
0150: 26 80 B7 14 E5 41 4B 7B 1A 4F D4 A3 BE D4 1B 13   &....AK{.O......
0160: B3 1C 54 E5 17 EF 71 EE 98 92 55 FE 17 FD 3D 2D   ..T...q...U...=-
0170: C8 99 39 9F 0E 78 1A 2C A5 FA 47 38 D2 1E DB 8D   ..9..x.,..G8....
0180: 5A 23 C3 42 20 11 50 86 95 17 AA A8 5C 5C ED C2   Z#.B .P.....\\..
0190: 49 86 0F A7 1A 51 29 BC A5 1A 3E 9D A5 75 13 FD   I....Q)...>..u..
01A0: CB FE 03 06 1A B2 64 27 29 2E 6C 69 6E 65 73 7B   ......d').lines{
01B0: 7C 6C 7C 6C 2E 74 6F 5F 69 3C 3D 72 26 26 24 3E   |l|l.to_i<=r&&$>
01C0: 3C 3C 6C 7D                                       <<l}

내가 올바르게 읽고 있다면, "해싱"체계는 7 번째와 11 번째 문자를 연결하는 것입니까? 그것은 내가 생각하지 않은 재미있는 방법입니다.
Gordon Bailey

5

하스켈, 787 자

main=interact$unlines.f.z(l 0[521,471,703,455,687,320,355,0,582,93,914,682,476,244,294,545][-15,-10,-5,-2,-2,-2,-1,1,1,2,2,2,5,10,15,100].g).s
f r=[show x++" "++y|(x,y)<-(r,"reputation"):takeWhile((<=r).fst)(zip[1,5,10,10,15,15,20,50,75,100,100,125,150,200,250,500,750,1000,1000,1250,1500,2000,3500,4000].s$"A E@participate in meta@remove new I restrictions@A K E@J up@flag E@talk in C@comment everywhere@set bounties@B community K@A C G@J down@A Hs@reH F@view D Js@cast D and reopen Js@established I@B F and answers@A gallery C G@A H synonyms@approve H K Bs@access to moderator tools@protect F@trusted I">>=h)]
g x=z fromEnum x-1219
h x=l[x]['@'..]("\n":words"create edit chat close posts questions rooms tag user vote wiki")x
l d k v x=maybe d id.lookup x$zip k v
s=lines
z=(sum.).map

5

C # 1271 1208 1206

public class D:Dictionary<string,int>{}
void A(){
string a="answer",q="question",c="create",y="accept",x=y+"ed",u="upvote",d="downvote";
var p=new D{{c+" posts",1},{"participate in meta",5},{"remove new user restrictions",10},{c+" wiki posts",10},{"vote up",15},{"flag posts",15},{"talk in chat",20},{"comment everywhere",50},{"set bounties",75},{"edit community wiki",100},{c+" chat rooms",100},{"vote down",125},{c+" tags",150},{"retag "+q+"s",200},{"view close votes",250},{"cast close and reopen votes",500},{"established user",750},{"edit "+q+"s and "+a+"s",1000},{c+" gallery chat rooms",1000},{c+" tag synonyms",1250},{"approve tag wiki edits",1500},{"access to moderator tools",2000},{"protect "+q+"s",3500},{"trusted user",4000}};
var e=new D{{a+" un"+x,-15},{a+" un"+u+"d",-10},{q+" un"+u+"d",-5},{a+" "+d+"d",-2},{q+" "+d+"d ",-2},{"un"+y+" "+a,-2},{d+" "+a,-1},{"join website",1},{"un"+d+" "+a,1},{y+" "+a,2},{q+" un"+d+"d",2},{a+" un"+d+"d",2},{q+" "+u+"d",5},{a+" "+u+"d",10},{a+" "+x,15},{"association bonus",100}};
var s=0;
for(var l=Console.ReadLine();l!="";l=Console.ReadLine())s+=e[l];
Console.WriteLine(s+" reputation");foreach(var i in p.Where(i=>i.Value<=s))Console.WriteLine(i.Key);}

4

C- 1083 1069

나는 경기에 조금 늦었지만 C는 대표하지 않기 때문에 나는 그것을 찌르겠다고 생각했다.

#include <stdio.h>
H(char*c){int h,n;for(h=n=0;*c!=0;++n,++c)h=(h^*c)+n;return h;}
main(){int h,r=0,R[483];R[110]=-15;R[122]=-10;R[153]=2;R[157]=1;R[189]=-2;R[20]=-2;R[235]=5;R[238]=15;R[28]=10;R[30]=2;R[351]=-5;R[388]=100;R[482]=-2;R[52]=2;R[77]=-1;R[87]=1;char L[99];while(h=H(gets(&L)))r+=R[h];
#define G(x)if(r<x)goto E;
#define P(x)printf("%s\n",x);
P("1 create posts")G(5)P("5 participate in meta")G(10)P("10 remove new user restrictions\n10 create wiki posts")G(15)P("15 vote up\n15 flag posts")G(20)P("20 talk in chat")G(50)P("50 comment everywhere")G(75)P("75 set bounties")G(100)P("100 edit community wiki\n100 create chat rooms")G(125)P("125 vote down")G(150)P("150 create tags")G(200)P("200 retag questions")G(250)P("250 view close votes")G(500)P("500 cast close and reopen votes")G(750)P("750 established user")G(1000)P("1000 edit questions and answers\n1000 create gallery chat rooms")G(1250)P("1250 create tag synonyms")G(1500)P("1500 approve tag wiki edits")G(2000)P("2000 access to moderator tools")G(3500)P("3500 protect questions")G(4000)P("4000 trusted user")E:}

#include <stdio.h>
H(char*c){int h,n;for(h=n=0;*c;++n,++c)h=(h^*c)+n;return h;}
main(){int h,r=0,R[483];R[110]=-15;R[122]=-10;R[153]=2;R[157]=1;R[189]=-2;R[20]=-2;R[235]=5;R[238]=15;R[28]=10;R[30]=2;R[351]=-5;R[388]=100;R[482]=-2;R[52]=2;R[77]=-1;R[87]=1;char L[99];while(h=H(gets(&L)))r+=R[h];
#define G(x)if(r<x)return;
#define P(x)puts(x);
P("1 create posts")G(5)P("5 participate in meta")G(10)P("10 remove new user restrictions\n10 create wiki posts")G(15)P("15 vote up\n15 flag posts")G(20)P("20 talk in chat")G(50)P("50 comment everywhere")G(75)P("75 set bounties")G(100)P("100 edit community wiki\n100 create chat rooms")G(125)P("125 vote down")G(150)P("150 create tags")G(200)P("200 retag questions")G(250)P("250 view close votes")G(500)P("500 cast close and reopen votes")G(750)P("750 established user")G(1000)P("1000 edit questions and answers\n1000 create gallery chat rooms")G(1250)P("1250 create tag synonyms")G(1500)P("1500 approve tag wiki edits")G(2000)P("2000 access to moderator tools")G(3500)P("3500 protect questions")G(4000)P("4000 trusted user")}

약간 덜 골프 버전은 다음과 같습니다.

#include <stdio.h>
int hash(char * c){int h,n;for(h=n=0;*c!=0;++n,++c)h=(h^*c)+n;return h;}
int main(int argc, char *argv[])
{
int R[483];
R[110]=-15;// answer unaccepted
R[122]=-10;// answer unupvoted
R[153]=2;  // question undownvoted
R[157]=1;  // join website
R[189]=-2; // question downvoted
R[20]=-2;  // answer downvoted
R[235]=5;  // question upvoted
R[238]=15; // answer accepted
R[28]=10;  // answer upvoted
R[30]=2;   // answer undownvoted
R[351]=-5; // question unupvoted
R[388]=100;// association bonus
R[482]=-2; // unaccept answer
R[52]=2;   // accept answer
R[77]=-1;  // downvote answer
R[87]=1;   // undownvote answer
int h,r=0;
char L[99];
while(h=hash(gets(&L)))r+=R[h];
#define G(x)if(r<x)goto end;
#define P(x)printf("%s\n",x);
P("1 create posts")
G(5)
P("5 participate in meta")
G(10)
P("10 remove new user restrictions")
P("10 create wiki posts")
G(15)
P("15 vote up")
P("15 flag posts")
G(20)
P("20 talk in chat")
G(50)
P("50 comment everywhere")
G(75)
P("75 set bounties")
G(100)
P("100 edit community wiki")
P("100 create chat rooms")
G(125)
P("125 vote down")
G(150)
P("150 create tags")
G(200)
P("200 retag questions")
G(250)
P("250 view close votes")
G(500)
P("500 cast close and reopen votes")
G(750)
P("750 established user")
G(1000)
P("1000 edit questions and answers")
P("1000 create gallery chat rooms")
G(1250)
P("1250 create tag synonyms")
G(1500)
P("1500 approve tag wiki edits")
G(2000)
P("2000 access to moderator tools")
G(3500)
P("3500 protect questions")
G(4000)
P("4000 trusted user")
end:
return 0;
}

기본 아이디어는 다른 많은 사람들의 접근 방식과 유사하다고 생각합니다. 입력 인식을 처리하기 위해 집에서 만든 작은 해시를 사용합니다. 해시는 빈 문자열에 대해 편리하게 0을 제공하여 입력 판독 라인을 매우 컴팩트하게 만듭니다. 해시가 크게 향상 될 수 있다고 확신합니다. 평판이 같은 것들에 대해 전략적 해시 충돌을 허용하면 캐릭터를 효과적으로 절약 할 수 있습니다.

나는 또한 goto매크로 내부에 숨어있는 진짜 재미없는 재미를 가지고있었습니다 (처음으로을 사용하면 goto자랑스럽게 생각합니다).

개선의 여지 가 많이 있다고 확신하는 은 출력 섹션에 있습니다. 실제 인쇄 논리를 압축하려고 시도조차하지 않았으므로 일부 문자를 저장할 수도 있습니다.


puts대신에 사용할 수 있습니다 printf.
Lowjacker

또한, 당신은 대체 할 수 goto Ereturn(라벨 제거)하고 제거 !=0해쉬 함수 (그것의 중복)에서.
Lowjacker

둘 다 좋은 점, 감사합니다!
Gordon Bailey

약간의 경쟁 은 신경 쓰지 않기를 바랍니다 .
MvG

3

C ( 765737 자)

#define P(x,m) if(s>=x)puts(#x" "#m);
s;char*e="&g 5 x$hg54  $  G5UC vg",l[99];main(){while(gets(l))s+=e[(l[11]%8^l[7])-97]*7%118-15;printf("%d reputation\n",s);P(1,create posts)P(5,participate in meta)P(10,remove new user restrictions)P(10,create wiki posts)P(15,vote up)P(15,flag posts)P(20,talk in chat)P(50,comment everywhere)P(75,set bounties)P(100,edit community wiki)P(100,create chat rooms)P(125,vote down)P(150,create tags)P(200,retag questions)P(250,view close votes)P(500,cast close and reopen votes)P(750,established user)P(1000,edit questions and answers)P(1000,create gallery chat rooms)P(1250,create tag synonyms)P(1500,approve tag wiki edits)P(2000,access to moderator tools)P(3500,protect questions)P(4000,trusted user)}

또는 줄 바꿈과 들여 쓰기가 추가되어 조금 더 읽기 쉽습니다.

#define P(x,m) if(s>=x)puts(#x" "#m);
s;char*e="&g 5 x$hg54  $  G5UC vg",l[99];
main(){
 while(gets(l))s+=e[(l[11]%8^l[7])-97]*7%118-15;
 printf("%d reputation\n",s);
 P(1,create posts)
 P(5,participate in meta)
 P(10,remove new user restrictions)
 P(10,create wiki posts)
 P(15,vote up)
 P(15,flag posts)
 P(20,talk in chat)
 P(50,comment everywhere)
 P(75,set bounties)
 P(100,edit community wiki)
 P(100,create chat rooms)
 P(125,vote down)
 P(150,create tags)
 P(200,retag questions)
 P(250,view close votes)
 P(500,cast close and reopen votes)
 P(750,established user)
 P(1000,edit questions and answers)
 P(1000,create gallery chat rooms)
 P(1250,create tag synonyms)
 P(1500,approve tag wiki edits)
 P(2000,access to moderator tools)
 P(3500,protect questions)
 P(4000,trusted user)
}

위의 코드는 파일 끝에 줄 바꿈이 하나 있다고 가정합니다. 두가있는 경우 다음 하나 개의 요구를 작성하는 s+=*l?e[…]:0대신 s+=e[…]에서, 5 개 문자의 추가 비용 . while(*gets(l))헤더가 포함되지 않았으므로 쓰기 가 더 짧아 지지만 작동하지 않으므로 컴파일러는 getsreturn이 int아닌 것으로 가정 합니다 char*.

해싱 표현식 (l[11]%8^l[7])-97은 다음 형식의 모든 표현식을 시도하여 결과 코드 길이가 가장 짧은 표현식 을 찾아서 발견되었습니다.

for i in range(13):
    for j in range(13):
        pat("a[i]^a[j]", i=i, j=j)
        pat("a[i]-a[j]", i=i, j=j)
        pat("a[i]|a[j]", i=i, j=j)
        pat("a[i]&a[j]", i=i, j=j)
        pat("a[i]*a[j]", i=i, j=j)
        pat("a[i]%a[j]", i=i, j=j)
        for k in range(13):
            pat("a[i]^a[j]^a[k]", i=i, j=j, k=k)
            pat("a[i]%a[j]^a[k]", i=i, j=j, k=k)
            pat("a[i]*a[j]^a[k]", i=i, j=j, k=k)
            pat("a[i]+a[j]^a[k]", i=i, j=j, k=k)
            pat("a[i]-a[j]^a[k]", i=i, j=j, k=k)
            pat("a[i]^a[j]|a[k]", i=i, j=j, k=k)
            pat("a[i]%a[j]|a[k]", i=i, j=j, k=k)
            pat("a[i]*a[j]|a[k]", i=i, j=j, k=k)
            pat("a[i]+a[j]|a[k]", i=i, j=j, k=k)
            pat("a[i]-a[j]|a[k]", i=i, j=j, k=k)
            pat("a[i]*k^a[j]", i=i, j=j, k=k)
            pat("a[i]%k^a[j]", i=i, j=j, k=k)
            pat("a[i]%k+a[j]", i=i, j=j, k=k)
            pat("a[i]%k-a[j]", i=i, j=j, k=k)
            pat("a[i]%k|a[j]", i=i, j=j, k=k)
            for l in range(13):
                pat("a[i]%k^a[j]%l", i=i, j=j, k=k, l=l)
        for k in range(100):
            pat("a[i]+k^a[j]", i=i, j=j, k=k)
            pat("a[i]-k^a[j]", i=i, j=j, k=k)

유사한 무차별 대입 검색을 사용하여 적합한 인쇄 가능한 ASCII 문자 표현을 찾았습니다.

파이썬 3 ( 743 개 715 문자)

위와 같은 정신으로. 그러나 이것은 입력 끝에 두 번째 줄 바꿈에 의존합니다.

s=0
while 1:
 l=input()
 if not l:break
 s+=b'>-/1/.04-1*//0//91%\x93/ -'[(ord(l[11])%8^ord(l[7]))-97]-47
print(s,"reputation")
for p in "1 create posts|5 participate in meta|10 remove new user restrictions|10 create wiki posts|15 vote up|15 flag posts|20 talk in chat|50 comment everywhere|75 set bounties|100 edit community wiki|100 create chat rooms|125 vote down|150 create tags|200 retag questions|250 view close votes|500 cast close and reopen votes|750 established user|1000 edit questions and answers|1000 create gallery chat rooms|1250 create tag synonyms|1500 approve tag wiki edits|2000 access to moderator tools|3500 protect questions|4000 trusted user".split("|"):
 if s>=int(p.split(" ")[0]):print(p)

2

자바-1519 자

import java.util.*;public class A{static List m=new ArrayList();static String c="create",p="posts",w="wiki",e="edit",v="vote",t="tag",q="questions";
static void g(String a){m.add(a);}public static void main(String a[]){
g("1 "+c+" "+p);g("5 participate in meta");g("10 remove new user restrictions");g("10 "+c+" "+w+" "+p);g("15 "+v+" up");g("15 flag "+p);g("20 talk in chat");g("50 comment everywhere");g("75 set bounties");g("100 "+e+" community "+w);g("100 "+c+" chat rooms");g("125 "+v+" down");g("150 "+c+" "+t+"s");g("200 re"+t+" "+q);g("250 view close "+v+"s");g("500 cast close and reopen "+v+"s");g("750 established user");g("1000 "+e+"s "+q+" and answers");g("1000 "+c+" gallery chat rooms");g("1250 "+c+" "+t+" synonyms");g("1500 approve "+t+" "+w+" "+e+"s");g("2000 access to moderator tools");g("3500 protect "+q);g("4000 trusted user");
Scanner s=new Scanner(System.in);String i=s.nextLine();int r=0;int b;
while(!i.equals("")){b=r(i);if(b==1740)r-=15;if(b==1690)r-=10;if(b==1922)r-=5;if(b==1674||b==1906||b==1539)r-=2;if(b==1574)r-=1;if(b==1219||b==1801)r+=1;if(b==1312||b==2133||b==1901)r+=2;if(b==1695)r+=5;if(b==1463)r+=10;if(b==1513)r+=15;if(b==1764)r+=100;i=s.nextLine();}
System.out.println(r+" reputation");for(Object q:m)if(c(q,r))System.out.println((String)q);}
static boolean c(Object q,int r){StringTokenizer t=new StringTokenizer((String)q);if(Integer.parseInt(t.nextToken())<=r)return true;return false;}
static int r(String i){int r=0;for(int k=0;k<i.length();)r+=i.charAt(k++);return r;}}

평판을 찾기 위해 입력 문자열에 모든 문자를 추가하고 (예 : 'join website'는 1219 양식에 추가) b == 1219 인 경우 r = r + 1입니다.


그것은 새로운 라인을 제거하는 방법이 있기 때문에 더욱 향상시킬 수 1511 대답을 줄일 수 없습니다 1519 1518 개 문자,의 c않습니다 if여부를 결정하기 위해 검사를 true하거나이 false이 같은 위치를 반환해야 boolean로부터는 if1470까지 크기를 가지고 직접 반환 할 수 있습니다 ;) 귀하의 답변 개선을 제안했습니다. 그것은 동료 검토를 기다리고 있습니다 :)
javatarz

어떤 이유로 든 내 편집 내용이 수락되지 않았습니다. 내 답변을 게시물로 다시 게시했습니다. [원하는 것은 아니지만 다른 방법은 보지 못했습니다 :(] 링크 : codegolf.stackexchange.com/a/18478/14156
javatarz

2

스칼라 1089

object R extends App{val t=List(("j.*",1),(".*s",100),(".*r a.*",15),(".*r d.*",-2),(".*n d.*",-2),(".* una.*",-15),("u.*",-2),("ac.*",2),("und.*",1),("d.*",-1),(".*r up.*",10),(".*n up.*",5),(".*r unu.*",-10),(".*r .*",2),(".*n unu.*",-5),(".*n .*",2))
def a(s:String)=t.find(x=>s.matches(x._1)).map(x=>x._2).getOrElse(0)
var(r,s)=(0,"")
do{s=readLine
r+=a(""+s)}while(s!=null)
println(r+" reputation")
val (q,c)=(" questions","create ")
val d=List(1->(c+"posts"),5->"participate in meta",10->"remove new user restrictions",10->(c+"wiki posts"),15->"vote up",15->"flag posts",20->"talk in chat",50->"comment everywhere",75->"set bounties",100->"edit community wiki",100->(c+"chat rooms"),125->"vote down",150->(c+"tags"),200->("retag"+q),250->"view close votes",500->"cast close and reopen votes",750->"established user",1000->("edit"+q+" and answers"),1000->(c+"gallery chat rooms"),1250->(c+"tag synonyms"),1500->"approve tag wiki edits",2000->"access to moderator tools",3500->("protect"+q),4000->"trusted user")
d.filter(_._1<=r).toList.sortBy(_._1).map(v=>println((v._1)+" "+v._2))}

거의 처음부터 다시 썼습니다. 데이터를 계산 해야하는 경우 데이터를 직접 포함시키는 것이 저렴합니다 (추악한 동안).

첫 번째 방법은 파일에서 이벤트 가격 및 권한 탭을 읽는 것입니다.

파일에서 데이터 읽기 : 405

object R extends App{import io.Source._
import java.util._
def m(n:String)={fromFile(n).getLines.toList.map{l=>val s=new Scanner(l);(s.next(),s.nextLine())}}
val e=m("e").map(a=>(a._2.trim->a._1.replaceAll("\\+","").toInt)).toMap
val p=m("p").map(b=>(b._1.toInt,b._2))
var(r,t)=(0,"")
for(t<-stdin.getLines)r+=e(t)
println(r+" reputation")
p.filter(_._1<=r).toList.sortBy(_._1).map(v=>println(v._1+v._2))}

프로그램 길이에 포함되어야하는 파일에 액세스하는 것 같습니다.
PhiNotPi

@PhiNotPi : 글쎄-나는 우리가 같은 규칙을 고수해야한다는 것을 이해합니다. 나는 고독한 게시물의 주석을 읽기 전에 솔루션을 시작했습니다. 이제 상단의 숫자 462와 작별 인사를 할 시간이 필요합니다.
사용자가 알 수 없음

@PhiNotPi : 당신이 옳다고 생각하지 않지만 나에게 친절합니다. 더 비싼 접근법으로 성실하게 답변 한 다른 답변들 대부분.
사용자가 알 수 없음

@PhiNotPi : 메타 사이트의 샌드 박스 를 사용 하여 기본 사이트에 새로운 도전 과제를 게시하기 전에 이와 같은 문제를 해결하는 데 도움 이되는 것이 좋습니다 .
hammar

1

J (704)

이 프로그램은 네 부분으로 구성됩니다.

  1. 다음 디코더 스크립트 ( 277 바이트)

    b=:,@#:@(a.i.fread)
    s=:(15+6*#.@(3{.12&}.))({.;$:^:(40<#)@}.)]
    r=:3 :'(15-~#.12{.y);;:^:_1[(#._6>\15}.y){u:@(96&+)&.>0 cut#._5>\b''w'''&.>@s@b
    f=:3 :'>>{.&.>e#~;((<y)=}.)&.>e=:r''e'''
    echo' reputation',~":R=:+/;f&.>LF cut 1!:1[3
    echo>((":@>@{.),' ',>@{:)&.>p#~R>>>{.&.>p=:r'p'
    
  2. 라는 이진 단어 파일 w277 바이트 (다운로드 여기 ).

    파일 형식은 다음과 같습니다. 각 단어는 5 비트 "바이트"그룹으로 인코딩됩니다. 5 비트의 각 그룹은 문자 127나타내는 값 또는 0구분 기호가 될 수 있습니다. 이벤트 및 권한 설명에서 모든 고유 한 단어가 여기에 저장됩니다.

  3. 라는 바이너리 이벤트 파일 e이며, 54 바이트 (다운로드 여기 ).

    각 이벤트는 12 바이트 평판과 하나 이상의 6 바이트 단어로 구성됩니다. 예를 들어 accept answer다음과 같이 인코딩됩니다.

     rep+15       Nwords  word1    word2
     000000010001 010     000110   011101
     17           2       6        29     <- these are indices in "w"
                          "accept" "answer"
    
  4. 라는 바이너리 권한 파일 p이며, 96 바이트 (다운로드 여기 ).

    파일 형식은와 동일합니다 e. 예를 들어 access to moderator tools다음과 같이 인코딩됩니다.

    rep+15       Nwords word1    word2  word3       word4
    011111011111 100    011010   011011 100000      010000
    2015         4      26       27     32          16
                        "access" "to"   "moderator" "tools"
    

0

펄, 856 849 자

$_="reputaT,A unPed,-15,A unU,-10,Q unU,-5,A DVd,-2,Q DVd,-2,unP A,-2,DV A,-1,join website,1,unDV A,1,P A,2,Q unDVd,2,A unDVd,2,Q U,5,A U,10,A Ped,15,associaT bonus,100,1,C Ps,5,participate in meta,10,remove new R restricTs,10,C wiki Ps,15,V up,15,flag Ps,20,talk in H,50,comment everywhere,75,set bounties,100,edit community wiki,100,C H rooms,125,V D,150,C tags,200,retag Qs,250,view close Vs,500,cast close and reopen Vs,750,established R,1000,edit Qs and As,1000,C gallery H rooms,1250,C tag synonyms,1500,approve tag wiki edits,2000,access to moderator tools,3500,protect Qs,4000,trusted R";$s="UupVd;Paccept;Aanswer;QquesT;Ccreate;Vvote;Ddown;Ttion;Opost;Hchat;Ruser;";$s=~s,(.)(.+?);,s/$1/$2/g;,g;eval $s;@D=split/,/;%R=@D[1..32];@P=@D[33..80];while(<>){chomp;$r+=$R{$_}}print("$r $D[0]\n");for(0..23){print"@P[$_*2,$_*2+1]\n"if$r>=$P[$_*2]}

가독성을 위해 세미콜론 다음에 줄 바꿈을 추가하는 것;) :

$_="reputaT,A unPed,-15,A unU,-10,Q unU,-5,A DVd,-2,Q DVd,-2,unP A,-2,DV A,-1,join website,1,unDV A,1,P A,2,Q unDVd,2,A unDVd,2,Q U,5,A U,10,A Ped,15,associaT bonus,100,1,C Ps,5,participate in meta,10,remove new R restricTs,10,C wiki Ps,15,V up,15,flag Ps,20,talk in H,50,comment everywhere,75,set bounties,100,edit community wiki,100,C H rooms,125,V D,150,C tags,200,retag Qs,250,view close Vs,500,cast close and reopen Vs,750,established R,1000,edit Qs and As,1000,C gallery H rooms,1250,C tag synonyms,1500,approve tag wiki edits,2000,access to moderator tools,3500,protect Qs,4000,trusted R";
$s="UupVd;Paccept;Aanswer;QquesT;Ccreate;Vvote;Ddown;Ttion;Opost;Hchat;Ruser;";
$s=~s,(.)(.+?);,s/$1/$2/g;,g;eval $s;
@D=split/,/;%R=@D[1..32];@P=@D[33..80];
while(<>){chomp;$r+=$R{$_}}print("$r $D[0]\n");
for(0..23){print"@P[$_*2,$_*2+1]\n"if$r>=$P[$_*2]}

0

자바 (1470 자)


참고 : 그것은의 수정의 아만 ZeeK 베르의 대답 하지만 내 편집을 받아 내 대답은 자신보다 훨씬 짧은되지 이후, 내가 여기를 게시하도록하겠습니다.

읽을 수있는 버전 :

import java.util.*;

public class A {

    static List m = new ArrayList();
    static String c = "create", p = "posts", w = "wiki", e = "edit", v = "vote", t = "tag", q = "questions";

    static void g(String a) {
        m.add(a);
    }

    public static void main(String a[]) {
        g("1 " + c + " " + p);
        g("5 participate in meta");
        g("10 remove new user restrictions");
        g("10 " + c + " " + w + " " + p);
        g("15 " + v + " up");
        g("15 flag " + p);
        g("20 talk in chat");
        g("50 comment everywhere");
        g("75 set bounties");
        g("100 " + e + " community " + w);
        g("100 " + c + " chat rooms");
        g("125 " + v + " down");
        g("150 " + c + " " + t + "s");
        g("200 re" + t + " " + q);
        g("250 view close " + v + "s");
        g("500 cast close and reopen " + v + "s");
        g("750 established user");
        g("1000 " + e + "s " + q + " and answers");
        g("1000 " + c + " gallery chat rooms");
        g("1250 " + c + " " + t + " synonyms");
        g("1500 approve " + t + " " + w + " " + e + "s");
        g("2000 access to moderator tools");
        g("3500 protect " + q);
        g("4000 trusted user");
        Scanner s = new Scanner(System.in);
        String i = s.nextLine();
        int r = 0;
        int b;
        while (!i.equals("")) {
            b = r(i);
            if (b == 1740) {
                r -= 15;
            }
            if (b == 1690) {
                r -= 10;
            }
            if (b == 1922) {
                r -= 5;
            }
            if (b == 1674 || b == 1906 || b == 1539) {
                r -= 2;
            }
            if (b == 1574) {
                r -= 1;
            }
            if (b == 1219 || b == 1801) {
                r += 1;
            }
            if (b == 1312 || b == 2133 || b == 1901) {
                r += 2;
            }
            if (b == 1695) {
                r += 5;
            }
            if (b == 1463) {
                r += 10;
            }
            if (b == 1513) {
                r += 15;
            }
            if (b == 1764) {
                r += 100;
            }
            i = s.nextLine();
        }
        System.out.println(r + " reputation");
        for (Object o : m) {
            if (c(o, r)) {
                System.out.println((String) o);
            }
        }
    }

    static boolean c(Object q, int r) {
        return Integer.parseInt(new StringTokenizer((String) q).nextToken()) <= r;
    }

    static int r(String i) {
        int r = 0;
        for (int k = 0; k < i.length();) {
            r += i.charAt(k++);
        }
        return r;
    }
}

축소 버전 :

import java.util.*;public class A{static List m=new ArrayList();static String c="create",p="posts",w="wiki",e="edit",v="vote",t="tag",q="questions";static void g(String a){m.add(a);}public static void main(String a[]){g("1 "+c+" "+p);g("5 participate in meta");g("10 remove new user restrictions");g("10 "+c+" "+w+" "+p);g("15 "+v+" up");g("15 flag "+p);g("20 talk in chat");g("50 comment everywhere");g("75 set bounties");g("100 "+e+" community "+w);g("100 "+c+" chat rooms");g("125 "+v+" down");g("150 "+c+" "+t+"s");g("200 re"+t+" "+q);g("250 view close "+v+"s");g("500 cast close and reopen "+v+"s");g("750 established user");g("1000 "+e+"s "+q+" and answers");g("1000 "+c+" gallery chat rooms");g("1250 "+c+" "+t+" synonyms");g("1500 approve "+t+" "+w+" "+e+"s");g("2000 access to moderator tools");g("3500 protect "+q);g("4000 trusted user");Scanner s=new Scanner(System.in);String i=s.nextLine();int r=0;int b;while(!i.equals("")){b=r(i);if(b==1740)r-=15;if(b==1690)r-=10;if(b==1922)r-=5;if(b==1674||b==1906||b==1539)r-=2;if(b==1574)r-=1;if(b==1219||b==1801)r+=1;if(b==1312||b==2133||b==1901)r+=2;if(b==1695)r+=5;if(b==1463)r+=10;if(b==1513)r+=15;if(b==1764)r+=100;i=s.nextLine();}System.out.println(r+" reputation");for(Object o:m)if(c(o,r))System.out.println((String)o);}static boolean c(Object q,int r){return Integer.parseInt(new StringTokenizer((String)q).nextToken())<=r;}static int r(String i){int r=0;for(int k=0;k<i.length();)r+=i.charAt(k++);return r;}}

0

PHP : 676 자

그것은 상을 얻지 못하지만 어쨌든 나는 이것을 더 작게 만드는 방법을 알 수 없으므로 그냥 게시 할 것입니다.

<?php
while($l=fgets(STDIN))foreach(@[j=>1,bo=>100,pt=>2,pte=>13,'r un?u?p'=>5,up=>5,wn=>-2,'e '=>1]as$k=>$v)@$r+=$v*ereg($k,$l)*(ereg(un,$l)?-1:1);$p=@preg_replace;foreach(split('
',$p('/[A-Z]/e','" ".$p("/.*?$0|[A-Z].*/","",@AaCcreateEeditGtagHchatIinLcloseMcommPpostsQquestionsRroomsTtUuserVvoteWwikiZre)',$r."Zputation
1CP
5 participateI meta
10Zmove newUZstrictions
10CWP
15V up
15 flagP
20TalkIH
50Ment everywhere
75 set bounties
100EMunityW
100CHR
125V down
150CGs
200ZtagQ
250 viewLVs
500 castLAndZopenVs
750 establishedU
1000EQAndAnswers
1000C galleryHR
1250CG synonyms
1500ApproveGWEs
2000AccessTo moderatorTools
3500 protectQ
4000TrustedU"))as$i)$r>=$i&&print"$i
";

담당자를 계산하는 부분은 읽기가 매우 어렵 기 때문에 추가 형식이 있습니다. 정의되지 않은 상수를 남용하고 @를 사용하여 종료합니다.

while($l=fgets(STDIN))
foreach(@[
        j=>1, // join website
        bo=>100, // association bonus
        pt=>2, // (un)?accept answer|answer (un)?accepted
        pte=>13, // answer (un)?accepted
        'r un?u?p'=>5, // answer (un)?upvoted
        up=>5, // (answer|question) (un)?upvoted
        wn=>-2, // (answer|question) (un)?downvoted|(un)?downvote answer
        'e '=>1 // (un)?downvote answer
        ]as$k=>$v)
    @$r+=$v*ereg($k,$l)*(ereg(un,$l)?-1:1);

경고를 무시할 필요는 없습니다. PHP가 오류나 정렬을 리턴하지 않는다고 가정하는 것이 안전합니다.
Konrad Borowski

@xfix 글쎄, 그것은 나에게 경고의 힙을주고 있으므로 조용히하기 위해 4 바이트로 뇌물을 줄 것입니다.
보안

0

APL (549)

이것은 데이터를 유니 코드 문자로 압축합니다.

P
D←{,⍉(20/2)⊤⎕UCS⍵}
M←{×⍴⍵:(2⊥⍺↑⍵),⍺∇⍺↓⍵⋄⍬}
Z←{15<⍴⍵:(⊂(15-⍨2⊥12↑⍵),' ',.,w[6M 15↓r↑⍵]),∇⍵↓⍨r←15+6×2⊥3↑12↓⍵⋄⍬}
w←⎕UCS¨96+1↓¨w⊂⍨0=w←5M D'崫񈁯񫒮򠉥򠁨퀖񽂠򫪰򳺅𠀣𙘔䢴鰒𫸅񰉹񳷙񬰍𭀠򓷭򘈵𬺉񻩠񋠕񰑣𬊅𠁬񼲠򣷬򘂏򻫏򡒀򤪳򡒀𬺁𓄳񁒀򳺅򘀮𠁏򫪉𬰃򑐴𨈵𬺉񻠕򅧴𩀁𘲳򘊏ᒉ򤰁񴻥򐇅򸋥𔴴𨆯𡙁򣹀򠓳৮򬰒𬺒񈺉񻩠멷𬩠𳀧ᛅ򖛨𬢠𛶭򫤴󈂏򻫏򡐁𘲰򡒀𸖌𬬠칯𚐴񋷀𣻮䉏򡑴⧩񰊮𣻮򳺅ᒉ򠈏򝉠򬀒𫗶𨁡򝀔鰕񰑣𬊀򫢏򻫏򡒀򀙔񈴰킠򲒷ؐ򓻅倬񘊳𬠀'
⎕←'reputation',⍨r←+/{⊃⊃e/⍨⍵∘{⍺≡⊃1↓⍵}¨e←Z D'O𞀊򞆀𩌣ڧ򒀍񌩀𚭷򀎕𯀈𫸀𐖃󀈨񷠄񓏀詻򀅄󋐃𩹨礽񐎚򲌀'}¨{×⍴⍵:(⊂' ',⍵),∇⍞⋄⍬}⍞
⎕←↑↑{⍵,⍨⍕⍺}/¨p/⍨r≥⊃¨p←Z D'၌񤀨󹎋ᦚ𿻈㋘爁󤋦㲦󈂍󸜈节򜅩殃򛱨䇍򰈘𑢅򴊕𱄆򺈍𐥽𠪐𝵐񘥔򿔩󩾼󄵚񓽸󅘡򉸭򍢥󫧞󀮯򿆷𡑶󭗆󽞤󽀀'


0

Python 3.x (801 자)

지금까지 할 수있는 최선은 base64보다 더 나은 인코딩을 수행해야합니다 (힌트 힌트 : 누군가 도울 수 있습니까?).

import base64,zlib
exec(zlib.decompress(base64.b64decode(b'eJxtU93O2jAMve9T+K7tCJ+ArZqExpMgLkJrICNNsvxQoel799kplI7toqLYPsfHx27hxVkoIYXbrcT+IJRxKVa1+F0m09nB3GxEkCYM6MvtWpSybdHFKbKhSH6FMYEdVTWi/GmVgQGPQUUccSHYVsmorIGjNSlQdLUS5a+EIQeT41YEJ3Qyb22Wm3nlJKybC5gFufwf8cv1VJrM1G25not445jKX8MtebqZlBdRM6v/r8CpdL36JH899vaGYHCAFCjtidOrlnmzOYRzznNJlGcY1FUBdipyrmHnWo8yjslwN9bce05tGkoFjGRyMlEhxb6TMkZCa/s+GRXvme2xgOxRcuPaqF/ENsJzQEJ/nTc7S63R36G9yAje2n5cIxcQN5oIeKP8cEFPa2/+UjkKp4gMJEXbwKvpaGzr0ADLCAx5YfLIzob4sCNKfQU6K25OvrJ2ReaNVA98Hj8PO42Qu4wreKkdOzzJx7MOAaKF3nboZbSe/ljNlBlBZPKoVbhgl9fFtrImn0KcQt/m5G8ekbnSR9Uqx0kao8co87V75B3OLN9w9UlT8CmweeyJ7yov+bM4kULNPOojOK1iVZZlQU+9LUCdQNMP+MVO7vWhcF6ZWHluRV93/gjLOjMoZnAjxO3V4cfOM/D8QbeHpqvoJCuO14sSyoWqH1RfgvU0dnUWV7zvtOyPnQS5Bc7Jpx4o6/3qUNcioNs91RV/ACHUeCw=')).decode())
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.