#include <stdio.h> int main() { int n = 0; while (scanf("%d", &n) != EOF) { int stl[7] = { 200,202,400,403,404,500,502 };//升序数组 char ch[7][50] = { {"OK"},{"Accepted"},{"Bad Request"},{"Forbidden"},{"Not Found"},{"Internal Server Error"},{"Bad Gateway"} }; int i, j = 0; for (i = 0; i < 7; i++,j++) { if (n == stl[i]) { printf("%s\n", ch[j]); } } } return 0; }