#include <stdio.h> int main() { int t = 0; //多组输入 while (~scanf(" %d", &t)) { if (t > 0) { printf("1\n"); } else if (0 == t) { printf("0.5\n"); } else { printf("0\n"); } } return 0; }
#include <stdio.h> int main() { int t = 0; //多组输入 while (~scanf(" %d", &t)) { if (t > 0) { printf("1\n"); } else if (0 == t) { printf("0.5\n"); } else { printf("0\n"); } } return 0; }