T1010-关于单位meter的单复数问题

caiwolo at 2018-04-03T16:46:21+00:00 Comments(0)

<!--Markdown--> <!--Markdown--> 程序检验逻辑为:不大于1的均为单数(即meter),大于1的均为复数(即meters)。 (实际英语中应该是不等于1,均为复数形式吧)

1030

20154835117 at 2018-03-13T13:00:18+00:00 Comments(0)

<!--Markdown--> #include<stdio.h> #include<math.h> int main(void) { float a,b,c,x,l,x1,x2,s; int L,S; scanf("%f %f %f",&a,&b,&c); x=pow(b,2)-4*a*c; x1=((-1)*b+sqrt(x))/(2*a); x2=((-1)*b-sqrt(x))/(2*a); l=x1-int(x1); if(l==0) L=0; else L=1; s=x2-int(x2); if(s==0) S=0; else S=1; if(x>0) { switch(L) { case 0: printf("The roots are %.f ",x1); break; case 1:

T7417-.。。

20171113802 at 2018-02-28T05:15:26+00:00 Comments(0)

<!--Markdown--> <!--Markdown--> import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); String s = in.next(); System.out.print("人民币"); String[] t = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }; String[] p = { "万", "仟", "佰", "拾", "园", "角", "分" }; int d = s.indexOf('.'); if (d==-1) { s=s+".00"; } if (d

T1047-asd

20171113834 at 2018-02-27T13:06:18+00:00 Comments(0)

<!--Markdown--> <!--Markdown--> import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); double y = in.nextDouble(); double n = 10000; double all = 0; int i = 1; for (i = 1; i <= y; i++) { n = Math.ceil((n * (1 + 0.05)) * 100) / 100; } System.out.printf("Tuition after " + (int)

T1562-为什么我用字符串来定位是错的?

unitly at 2017-11-22T10:03:25+00:00 Comments(4)

<!--Markdown--> <!--Markdown--> import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); StringBuffer strB=new StringBuffer(); for(int i=0;i<n;i++){ int t=sc.nextInt(); strB.append(t); } String str=strB.toString(); int f=sc.nextInt(); System.out.print(str.indexOf(f+"")+1); sc.close(

T1047-求大佬解答!错哪儿了!

845520 at 2017-11-21T06:00:19+00:00 Comments(1)

<!--Markdown--> <!--Markdown--> import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner(System.in); int n = input.nextInt(); double money = 10000; double b = 0; double z = 1; while (z <= n) { money = Math.ceil(money * (1 + 0.05) * 100) / 100; z++; } b = money + Math.ceil(money *

xss

20134856586 at 2017-10-15T15:59:03+00:00 Comments(24)

<!--Markdown--> <style> html{ margin-top:20px; } </style>

giftest

PiedPiper at 2017-10-15T15:45:09+00:00 Comments(4)

<!--Markdown--> ![gif](https://static.acmore.cc/article/PiedPiper/kAiutaMRHWaVHYc5apWNGd/timg[2].gif "gif")