結果
問題 | No.276 連続する整数の和(1) |
ユーザー |
|
提出日時 | 2018-08-15 15:10:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 322 bytes |
コンパイル時間 | 1,439 ms |
コンパイル使用メモリ | 166,992 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 09:23:28 |
合計ジャッジ時間 | 2,034 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;const long mod = 1e9 + 7;int main(void) {#ifdef DEBUGfreopen("input.txt", "r", stdin);#endifios_base::sync_with_stdio(false);cin.tie(NULL);long N;cin >> N;long ans = __gcd(N, N * (N - 1) / 2);cout << ans << endl;return 0;}