結果

問題 No.276 連続する整数の和(1)
ユーザー FF256grhyFF256grhy
提出日時 2015-09-04 23:30:56
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 241 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 25,364 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-26 06:59:40
合計ジャッジ時間 3,378 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
8,760 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 637 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

// 多分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;
}
0