0
已解决
吕梓瑜
初级天翼
初级天翼
https://ke.codingtang.com/#/p**blem/p**blemSub?id=5565
#include<bits/stdc++.h>
#include<algo**thm>
#include<iostream>
#include<**t**ng>
#include<st**ng>
#include<**tdio>
#include<cmath>
using name** std;
int main()
{
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
int a,b,c;
char z;
cin>>a>>z>>b>>z>>c>>z;
if(a>=12&&a<=24){
if(a-12<=9){
cout<<"0"<<a-12;
}
else{
cout<<a-12;
}
cout<<":";
if(b<=9){
cout<<"0"<<b;
}
else{
cout<<b;
}
cout<<":";
if(c<=9){
cout<<"0"<<c;
}
else{
cout<<c;
}
}
else{
cout<<a<<":";
if(b<=9){
cout<<"0"<<b;
}
else{
cout<<b;
}
cout<<":";
if(c<=9){
cout<<"0"<<c;
}
else{
cout<<c;
}
}
//fclose(stdin);
//fclose(stdout);
ret**n 0;
}
这是我的代码,请问为什么是60分?
吕梓瑜在2021-08-04 19:23:17追加了内容
我的标题错了,别介意