Submission #00012


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;
if(a*1000000+b*1000+c>d*1000000+e*1000+f){
swap(a,d);
swap(b,e);
swap(c,f);
}
if(b==e&&c==f){
cout<<d-a<<"\n";
}else{
b=b*100+c;
e=e*100+f;
if(b<e){
cout<<d-a+1<<"\n";
}else{
cout<<d-a<<"\n";
}
}
}

ステータス

項目 データ
問題 0003 - 歳の差は。
ユーザー名 ei2326
投稿日時 2024-10-18 16:27:10
言語 C++17
状態 Accepted
得点 5
ソースコード長 459 Byte
最大実行時間 29 ms
最大メモリ使用量 704 KB

セット

セット 得点 Cases
1 ALL 5 / 5 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 18 ms 604 KB
1
in02.txt AC 21 ms 440 KB
1
in03.txt AC 16 ms 536 KB
1
in04.txt AC 27 ms 504 KB
1
in05.txt AC 24 ms 468 KB
1
in06.txt AC 27 ms 568 KB
1
in07.txt AC 23 ms 540 KB
1
in08.txt AC 16 ms 508 KB
1
in09.txt AC 23 ms 612 KB
1
in10.txt AC 21 ms 456 KB
1
in11.txt AC 20 ms 428 KB
1
in12.txt AC 23 ms 652 KB
1
in13.txt AC 22 ms 492 KB
1
in14.txt AC 21 ms 588 KB
1
in15.txt AC 19 ms 432 KB
1
in16.txt AC 18 ms 664 KB
1
in17.txt AC 29 ms 508 KB
1
in18.txt AC 28 ms 480 KB
1
in19.txt AC 20 ms 704 KB
1
in20.txt AC 23 ms 676 KB
1
in21.txt AC 16 ms 644 KB
1
in22.txt AC 23 ms 488 KB
1
in23.txt AC 26 ms 460 KB
1
in24.txt AC 19 ms 560 KB
1