結果

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

テストケース

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

ソースコード

diff #

// 多分TLE

#include <stdio.h>

int main(void) {
	int n;
	scanf("%d", &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