結果
問題 | No.276 連続する整数の和(1) |
ユーザー | s1dim |
提出日時 | 2015-09-14 21:32:16 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 285 bytes |
コンパイル時間 | 619 ms |
コンパイル使用メモリ | 51,144 KB |
実行使用メモリ | 7,688 KB |
最終ジャッジ日時 | 2023-09-26 11:53:31 |
合計ジャッジ時間 | 4,287 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
7,688 KB |
testcase_01 | AC | 1 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | TLE | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
ソースコード
#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; } } }