結果

問題 No.353 ヘイトプラス
コンテスト
ユーザー nobigomu
提出日時 2018-03-05 22:24:11
言語 Lua
(LuaJit 2.1.1774638290)
コンパイル:
luajit -b _filename_ a.out
実行:
luajit _filename_
結果
AC  
実行時間 0 ms / 1,000 ms
+ 931µs
コード長 225 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 60 ms
コンパイル使用メモリ 5,888 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-05 13:20:34
合計ジャッジ時間 1,061 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

local bit = require 'bit'

function add(a, b)
	while b ~= 0 do
		local c = bit.lshift(bit.band(a, b), 1)
		a = bit.bxor(a, b)
		b = c
	end
	return a
end

local a, b = io.stdin:read("*n"), io.stdin:read("*n")
print(add(a, b))
0