Home > Back-end >  Hangzhou electric ACM2033 solution
Hangzhou electric ACM2033 solution

Time:12-12

#include
#include
using namespace std;
Int main ()
{
Int n, a [3], [3] b, x [3].

While (~ scanf_s (" % d ", & amp; N))
{
For (int I=0; i <2; I++)
{
For (int I=0; i <=2; I++)
{
Scanf_s (" % d ", & amp; A [I]);
}
For (int I=0; i <=2; I++)
{
Scanf_s (" % d ", & amp; B [I]);
}
Memset (x, 0, sizeof (x));
X [0]=[0] a [0] + b;
[1] x=a, b [1] + [1].
X [2]=[2] a [2] + b;
If (x [2] & gt; 60)
{

[2] - [2]=x x 60;
[1] + x=1;

}
If (x [1] & gt; 60)
{

[1] - [1]=x x 60;
[0] + x=1;
}
For (int j=0; j <3; J++)
{
cout Printf (j==2? "\ n" : "");
}
}



}

return 0;
}
This is my code, run the following

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # line
#include
using namespace std;
Int main () {
int n;
Int ah, am, as, bh, bm, bs;
Int s, m, h;
cin> n;
While (n -) {
cin> Ah & gt;> Am & gt;> As & gt;> Bh & gt;> Bm & gt;> Bs;
S=the as + bs; M=am + bm. H=ah + bh.
If (s & gt; 60) {
M +=1;
S=s - 60;
}
If (m & gt; 60) {
H +=1;
M=m - 60;
}
cout }
return 1;
} this is a big code in the BBS, can lead, but the topic request, minutes and seconds 0 ~ 59, the measured here can reach 60;
I thought it was a subject description problem, when I change my code & gt;=& gt; When found, or not;
For big solutions
  • Related