結果
問題 |
No.2845 Birthday Pattern in Two Different Calendars
|
ユーザー |
|
提出日時 | 2024-08-23 22:57:21 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 340 bytes |
コンパイル時間 | 516 ms |
コンパイル使用メモリ | 82,428 KB |
実行使用メモリ | 89,088 KB |
最終ジャッジ日時 | 2024-08-23 22:57:27 |
合計ジャッジ時間 | 5,596 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 7 WA * 15 |
ソースコード
for _ in range(int(input())): k,m,n=map(int,input().split()) if m==1: print('No') continue s=[0]*(k+1) t=0 ans=[] for i in range(1,k+1): j=(i+m-2)%k+1 if s[i]==s[j]==0: s[i]=s[j]=1 t+=1 ans+=i, if t==n: break if t==n: print('Yes') print(*sorted(ans)) else: print('No')