結果
問題 |
No.276 連続する整数の和(1)
|
ユーザー |
![]() |
提出日時 | 2015-09-14 21:32:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 592 ms |
コンパイル使用メモリ | 53,848 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-19 06:28:30 |
合計ジャッジ時間 | 3,576 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 2 TLE * 1 -- * 4 |
ソースコード
#include<iostream> using namespace std; int main(){ int n; int t = 0; cin >> n; for(int i = 1; i < n; i++){ t += i; } for(int x = n; x > 0; x--){ if(n%x == 0 && t%x == 0){ cout << x << endl; return 0; } } }