結果
問題 |
No.358 も~っと!門松列
|
ユーザー |
![]() |
提出日時 | 2016-04-17 22:52:21 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 288 bytes |
コンパイル時間 | 395 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-10-04 10:43:16 |
合計ジャッジ時間 | 1,001 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 8 |
ソースコード
#coding:utf-8 def main(): A=map(int,raw_input().split()) if A[1]==1: return 'INF' cnt=0 for p in range(1,max(A)+1): B=[] for i in A: B.append(i%p) if len(set(B))==3: if max(B)==B[1] or min(B)==B[1]: cnt+=1 return cnt if __name__=='__main__': print main()