import java.util.Scanner;
public class Main {
public static int XY(int x){
if(x<1)
return x;
if(1<=x&&x<10)
return 2*x+1;
if(x>=10)
return 3*x-11;
return 1;
}
public static void main(String[] arg){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
System.out.print(XY(x));
}
}
0.0分
4 人评分
C语言训练-立方和不等式 (C语言代码)浏览:742 |
九宫重排 (C++代码)浏览:1326 |
c primer plus 第十二章 12.1小节浏览:375 |
Pascal三角 (C语言代码)格式错误浏览:516 |
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:624 |
C语言程序设计教程(第三版)课后习题10.7 (C语言代码)浏览:538 |
WU-图形输出 (C++代码)浏览:800 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:526 |
C语言程序设计教程(第三版)课后习题6.6 (C语言代码)浏览:349 |
C语言程序设计教程(第三版)课后习题8.8 (C语言代码)浏览:853 |