結果
問題 | No.276 連続する整数の和(1) |
ユーザー |
|
提出日時 | 2019-01-19 14:21:46 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 297 bytes |
コンパイル時間 | 2,361 ms |
コンパイル使用メモリ | 61,256 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 10:20:50 |
合計ジャッジ時間 | 2,869 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
import mathproc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}proc scan(): int =while true:var k = getchar_unlocked()if k < '0': breakresult = 10 * result + k.ord - '0'.ordlet n = scan()let n2 = n * (n + 1) div 2let n3 = n2 + necho n2.gcd(n3)