結果
| 問題 |
No.632 穴埋め門松列
|
| コンテスト | |
| ユーザー |
Project2017C2
|
| 提出日時 | 2018-01-21 22:19:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 767 bytes |
| コンパイル時間 | 1,835 ms |
| コンパイル使用メモリ | 165,264 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-25 21:55:13 |
| 合計ジャッジ時間 | 1,959 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
コンパイルメッセージ
main.cpp: In function 'll gcd(ll, ll)':
main.cpp:24:17: warning: control reaches end of non-void function [-Wreturn-type]
24 | else gcd(b, a%b);
| ~~~^~~~~~~~
ソースコード
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using IP = pair<int, int>;
const ll linf = 1LL << 62;
const int inf = 99999999;
const int dx[4] = { 1,0,-1,0 };
const int dy[4] = { 0,1,0,-1 };
const ll atcoder = 1e9 + 7;
#define Endl endl
#define mp make_pair
#define all(v) v.begin(),v.end()
#define pb push_back
#define pr(x) cout << x << endl
#define chmax(x,y) x = max(x,y)
#define chmin(x,y) x = min(x,y)
#define rep(i,n) for(int i= 0;i<n;i++)
ll gcd(ll a, ll b) {//最大公約数
if (a%b == 0)return b;
else gcd(b, a%b);
}
ll lcm(ll a, ll b) {//最小公倍数
return (a / gcd(a, b))*b;
}
int main(){
char a, b, c;
cin >> a >> b >> c;
if (b == '2') pr(4);
else if (b == '3')pr(1);
else pr(14);
//system("pause");
return 0;
}
Project2017C2