結果
| 問題 | 
                            No.358 も~っと!門松列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             focus
                         | 
                    
| 提出日時 | 2018-02-17 02:35:10 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 3 ms / 1,000 ms | 
| コード長 | 349 bytes | 
| コンパイル時間 | 620 ms | 
| コンパイル使用メモリ | 63,528 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-23 21:27:28 | 
| 合計ジャッジ時間 | 1,507 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
#include<iostream>
#include<string>
#include<cstdio>
using namespace std;
int main(){
    int A1,A2,A3,count=0;
    cin >> A1 >> A2 >> A3;
    for(int i=1;i<100000;i++){
        if((A2%i>A1%i&&A2%i>A3%i&&A1%i!=A3%i)||(A2%i<A1%i&&A2%i<A3%i&&A1%i!=A3%i))  count++;
    }
    if(count > 1000)    cout << "INF";
    else cout << count; 
    return 0;
}
            
            
            
        
            
focus