結果
問題 |
No.571 3人兄弟(その2)
|
ユーザー |
![]() |
提出日時 | 2017-11-25 12:38:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,013 bytes |
コンパイル時間 | 126 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-27 10:01:17 |
合計ジャッジ時間 | 1,091 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 12 |
ソースコード
a = map(int, raw_input().split()) b = map(int, raw_input().split()) c = map(int, raw_input().split()) brothers = [a,b,c] num = 0 while brothers[0][0] <= brothers[1][0] or brothers[1][0] <= brothers[2][0]: if brothers[0][0] <= brothers[1][0]: brothers = [brothers[1],brothers[0],brothers[2]] elif brothers[1][0] <= brothers[2][0]: brothers = [brothers[0],brothers[2],brothers[1]] while num < 5: if brothers[0][0] == brothers[1][0]: if brothers[0][1] >= brothers[1][1]: brothers = [brothers[0],brothers[1],brothers[2]] else: brothers = [brothers[1],brothers[0],brothers[2]] elif brothers[1][0] == brothers[2][0]: if brothers[1][1] >= brothers[2][0]: brothers = [brothers[0],brothers[1],brothers[2]] else: brothers = [brothers[0],brothers[2],brothers[1]] num += 1 brothers[brothers.index(a)] = 'A' brothers[brothers.index(b)] = 'B' brothers[brothers.index(c)] = 'C' for i in brothers: print(i)