結果
問題 | No.316 もっと刺激的なFizzBuzzをください |
ユーザー |
|
提出日時 | 2019-01-18 14:23:23 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 441 bytes |
コンパイル時間 | 2,451 ms |
コンパイル使用メモリ | 61,052 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 10:16:55 |
合計ジャッジ時間 | 3,660 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
import mathproc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .}proc scan(): int =while true:var k = getchar_unlocked()if k < '0' or k > '9': breakelse: result = 10 * result + k.ord - '0'.ordlet n = scan()let a = scan()let b = scan()let c = scan()var ans = 0ans += n div a + n div b + n div cans -= n div a.lcm(b) + n div b.lcm(c) + n div c.lcm(a)ans += n div a.lcm(b).lcm(c)echo ans