結果

問題 No.276 連続する整数の和(1)
ユーザー MaxMellonMaxMellon
提出日時 2015-09-12 01:48:28
言語 Ruby
(3.1.1p18 )
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 178 bytes
コンパイル時間 32 ms
使用メモリ 13,988 KB
最終ジャッジ日時 2023-02-17 09:40:20
合計ジャッジ時間 1,942 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 73 ms
13,964 KB
testcase_01 AC 71 ms
13,988 KB
testcase_02 AC 71 ms
13,676 KB
testcase_03 AC 75 ms
13,792 KB
testcase_04 AC 73 ms
13,680 KB
testcase_05 AC 71 ms
13,928 KB
testcase_06 AC 72 ms
13,928 KB
testcase_07 AC 72 ms
13,792 KB
testcase_08 AC 72 ms
13,684 KB
testcase_09 AC 71 ms
13,796 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.chomp.to_i                                                                                                                                           
p n.gcd(n*(n+1)/2) 
0