結果
問題 | No.358 も~っと!門松列 |
ユーザー |
|
提出日時 | 2016-09-28 15:44:49 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 12 ms / 1,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2024-11-21 07:58:04 |
合計ジャッジ時間 | 1,152 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
def is_kadomatsu(a, b, c):if a == b or b == c or c == a:return Falseif b < a and b < c:return Trueif b > a and b > c:return Truereturn Falsea, b, c = map(int, raw_input().split())print 'INF' if is_kadomatsu(a, b, c) else sum(is_kadomatsu(a%i, b%i, c%i) for i in xrange(1, max(a,b,c)+2))