結果
| 問題 |
No.358 も~っと!門松列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-12 14:45:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 1,000 ms |
| コード長 | 721 bytes |
| コンパイル時間 | 1,416 ms |
| コンパイル使用メモリ | 105,776 KB |
| 最終ジャッジ日時 | 2025-01-11 19:59:45 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
using namespace std;
typedef long long int ll;
using ull = unsigned long long;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int a,b,c; cin >> a >> b >> c;
if((b>a&&b>c&&a!=c)||(a>b&&c>b&&a!=c)){
printf("INF\n");
}
else{
int res=0;
for(int p=1;p<=1010;p++){
int aa=a%p,bb=b%p,cc=c%p;
if((bb>aa&&bb>cc&&aa!=cc)||(aa>bb&&cc>bb&&aa!=cc)){
res++;
}
}
printf("%d\n",res);
}
}