結果

問題 No.2929 Miracle Branch
ユーザー hirayuu_ychirayuu_yc
提出日時 2024-06-12 15:02:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 355 bytes
コンパイル時間 216 ms
コンパイル使用メモリ 82,132 KB
実行使用メモリ 78,388 KB
最終ジャッジ日時 2024-06-12 15:02:24
合計ジャッジ時間 4,600 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
58,296 KB
testcase_01 AC 41 ms
59,168 KB
testcase_02 AC 39 ms
58,184 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 60 ms
70,008 KB
testcase_19 AC 60 ms
70,816 KB
testcase_20 AC 59 ms
73,056 KB
testcase_21 AC 66 ms
76,112 KB
testcase_22 WA -
testcase_23 AC 73 ms
76,308 KB
testcase_24 AC 89 ms
78,388 KB
testcase_25 WA -
testcase_26 AC 49 ms
64,488 KB
testcase_27 AC 53 ms
66,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

X=int(input())
g=[]
for i in range(2,200000):
    while X%i==0:
        g.append(i)
        X//=i
if X!=1:
    print(-1)
    exit()
if len(g)==0:
    g.append(1)
print(sum(g)+len(g))
c=["b"]*len(g)+["g"]*sum(g)
pos=len(g)+1
for i in range(len(g)):
    if i!=0:
        print(i,i+1)
    for j in range(g[i]):
        print(i+1,pos)
        pos+=1
print(*c)
0