結果

問題 No.3659 CONSTRUCTION 1,2,3
コンテスト
ユーザー 👑 loop0919
提出日時 2026-08-30 14:16:47
言語 PyPy3
(7.3.23)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 64 ms / 2,000 ms
+ 534µs
コード長 447 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,256 ms
コンパイル使用メモリ 95,980 KB
実行使用メモリ 79,232 KB
最終ジャッジ日時 2026-08-30 14:16:55
合計ジャッジ時間 2,568 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from itertools import permutations

L = sorted([int(s) for s in input().split()])

if L[0] * L[1] * L[2] % 6 != 0:
    print("No")
    exit()

for a, b, c in permutations(L):
    if a > 1 and b > 1 and a * b % 6 == 0:
        print("Yes")
        exit()
    if c % 2 == 0:
        if a * b % 3 == 0:
            print("Yes")
            exit()
    if c % 3 == 0:
        if a * b % 2 == 0:
            print("Yes")
            exit()

print("No")
0