結果
問題 |
No.276 連続する整数の和(1)
|
ユーザー |
![]() |
提出日時 | 2015-09-04 23:30:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 238 ms |
コンパイル使用メモリ | 22,016 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-19 02:19:27 |
合計ジャッジ時間 | 3,351 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 TLE * 1 -- * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%lld", &n); | ~~~~~^~~~~~~~~~~~
ソースコード
// 多分TLE #include <stdio.h> int main(void) { long long int n; scanf("%lld", &n); long long int s = n * (n - 1) / 2; int i; for(i = n; 0 <= i ; i--) { if(n % i == 0 && s % i == 0) { break; } } printf("%d\n", i); return 0; }