結果
問題 |
No.276 連続する整数の和(1)
|
ユーザー |
|
提出日時 | 2016-06-07 15:32:18 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 711 ms |
コンパイル使用メモリ | 55,788 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-08 17:20:04 |
合計ジャッジ時間 | 2,417 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 7 |
ソースコード
#include <iostream> #include <cstdint> using namespace std; int euc(int m, int n) { if (n == 0) return m; else return euc(n, m % n); } int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int m = 0; for (int i = 0; i < n; ++i) { m += i; } cout << euc(m, n) << endl; return 0; }