Skip to content

Commit 5d9edb3

Browse files
committed
Site updated: 2017-07-23 08:42:41
1 parent de4a567 commit 5d9edb3

36 files changed

Lines changed: 354 additions & 0 deletions

File tree

code/HPU暑期 1/A/in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
4
2+
10000 100 2.3 3.7 3.9
3+
10000 100 1.7 3.7 3.9
4+
10000 200 1.7 3.7 3.9
5+
10000 300 1.7 3.7 3.9

code/HPU暑期 1/A/sol

8.52 KB
Binary file not shown.

code/HPU暑期 1/A/sol.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include<stdio.h>
2+
3+
int main()
4+
{
5+
int T;
6+
while(scanf("%d",&T)!=EOF){
7+
double mon,base,e,f,g;
8+
while(T--){
9+
scanf("%lf%lf%lf%lf%lf",&mon,&base,&e,&f,&g);
10+
double t=mon;
11+
mon+=mon*e/100.0*base/365;
12+
if(base>=100) mon+=mon*g/100.0;
13+
else mon+=mon*f/100.0;
14+
printf("%.1lf\n",mon);
15+
16+
mon=t;
17+
mon*=(1+f/100*(base+365)/365);
18+
printf("%.1lf\n",mon);
19+
}
20+
}
21+
return 0;
22+
}

code/HPU暑期 1/B/in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
4
2+
10000 100 2.3 3.7 3.9
3+
10000 100 1.7 3.7 3.9
4+
10000 200 1.7 3.7 3.9
5+
10000 300 1.7 3.7 3.9

code/HPU暑期 1/B/sol

8.56 KB
Binary file not shown.

code/HPU暑期 1/B/sol.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include<stdio.h>
2+
#include<string.h>
3+
4+
int main()
5+
{
6+
int n,m;
7+
while(scanf("%d%d",&n,&m)!=EOF){
8+
putchar('+');
9+
for(int i=0;i<n;++i) putchar('-');
10+
puts("+");
11+
for(int i=0;i<m;++i){
12+
putchar('|');
13+
for(int i=0;i<n;++i) putchar(' ');
14+
puts("|");
15+
}
16+
putchar('+');
17+
for(int i=0;i<n;++i) putchar('-');
18+
puts("+");
19+
putchar('\n');
20+
}
21+
return 0;
22+
}

code/HPU暑期 1/C/in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ZZOOOJJJ
2+
ZZZZOOOOOJJJ
3+
ZOOOJJ
4+
E

code/HPU暑期 1/C/sol

8.51 KB
Binary file not shown.

code/HPU暑期 1/C/sol.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include<stdio.h>
2+
char s[102];
3+
int num[26];
4+
5+
int main()
6+
{
7+
8+
while(gets(s)){
9+
if(s[0]=='E') break;
10+
for(int i=0;s[i];++i){
11+
++num[s[i]-'A'];
12+
}
13+
while(num['Z'-'A']|num['O'-'A']|num['J'-'A']){
14+
if(num['Z'-'A']>0) putchar('Z'),--num['Z'-'A'];
15+
if(num['O'-'A']>0) putchar('O'),--num['O'-'A'];
16+
if(num['J'-'A']>0) putchar('J'),--num['J'-'A'];
17+
}
18+
putchar('\n');
19+
}
20+
return 0;
21+
}

code/HPU暑期 1/D/in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
4
2+
0101
3+
1000
4+
1111
5+
0101

0 commit comments

Comments
 (0)