結果
問題 |
No.2929 Miracle Branch
|
ユーザー |
|
提出日時 | 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 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 17 |
ソースコード
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)