結果

問題 No.3012 岩井星人グラフ
ユーザー Facade
提出日時 2025-01-25 14:28:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 82,592 KB
実行使用メモリ 99,712 KB
最終ジャッジ日時 2025-01-25 23:21:56
合計ジャッジ時間 7,276 ms
ジャッジサーバーID
(参考情報)
judge7 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

x,y=map(int,input().split())
#ans=x*y(????????????????????
ans=[]
for i in range(x):
    if i!=0:
        ans.append(((i-1)*y,i*y))
    for j in range(y-1):
        ans.append((i*y+j,i*y+j+1))
    if i==x-1:
        ans.append((0,i*y))
print(x*y,x*y)
for i,j in ans:
    print(i+1,j+1)
0